This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,28 @@ mirrors the process of compiling source code in
43
43
Before we can write a directive, we need to know how Angular's {@link guide/compiler HTML compiler}
44
44
determines when to use a given directive.
45
45
46
- In the following example, we say that the `<input>` element **matches** the `ngModel` directive.
46
+ Similar to the terminology used when an [element **matches** a selector]
47
+ (https://developer.mozilla.org/en-US/docs/Web/API/Element.matches), we say an element **matches** a
48
+ directive when the directive is part of its declaration.
49
+
50
+ In the following example, we say that the `<input>` element **matches** the `ngModel` directive
47
51
48
52
```html
49
53
<input ng-model="foo">
50
54
```
51
55
52
- The following also **matches** `ngModel`:
56
+ The following `<input>` element also **matches** `ngModel`:
53
57
54
58
```html
55
59
<input data-ng-model="foo">
56
60
```
57
61
62
+ And the following <person> element **matches** the `person` directive:
63
+
64
+ ```html
65
+ <person>{{name}}</person>
66
+ ```
67
+
58
68
### Normalization
59
69
60
70
Angular **normalizes** an element's tag and attribute name to determine which elements match which
You can’t perform that action at this time.
0 commit comments