This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,13 @@ Let's see an example:
88
88
});
89
89
```
90
90
91
+ ```html
92
+ <body>
93
+ <!-- The following line is how to use the `greetUser` component above in your html doc. -->
94
+ <greet-user></greet-user>
95
+ </body>
96
+ ```
97
+
91
98
Now, every time we include `<greet-user></greet-user>` in our view, AngularJS will expand it into a
92
99
DOM sub-tree constructed using the provided `template` and managed by an instance of the specified
93
100
controller.
@@ -127,7 +134,7 @@ acquired skill.
127
134
<body>
128
135
129
136
<!-- Use a custom component to render a list of phones -->
130
- <phone-list></phone-list>
137
+ <phone-list></phone-list> <!-- This tells AngularJS to instantiate a `phoneList` component here. -->
131
138
132
139
</body>
133
140
</html>
@@ -148,7 +155,7 @@ angular.module('phonecatApp', []);
148
155
// Register `phoneList` component, along with its associated controller and template
149
156
angular.
150
157
module('phonecatApp').
151
- component('phoneList', {
158
+ component('phoneList', { // This name is what AngularJS uses to match to the `<phone-list>` element.
152
159
template:
153
160
'<ul>' +
154
161
'<li ng-repeat="phone in $ctrl.phones">' +
You can’t perform that action at this time.
0 commit comments