Skip to content

Commit d8bed9e

Browse files
committed
Minor syntax changes
1 parent bcc3864 commit d8bed9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/angular-validator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ angular.module('angularValidator').directive('angularValidator', ['$injector', '
4343
// an array to store all the watches for form elements
4444
var watches = [];
4545

46-
// This is the the scope form model
46+
// This is the the scope form model, it is created automatically by angular
4747
// All validation states are contained here
48-
var form_name = DOMForm.attributes['name'].value;
49-
var scopeForm = $parse(form_name)(scope);
48+
// See: https://docs.angularjs.org/api/ng/directive/form
49+
var scopeForm = $parse(attrs.name)(scope);
5050

5151
// Set the default submitted state to false
5252
scopeForm.submitted = false;

0 commit comments

Comments
 (0)