Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Update step_03.ngdoc to clarify #16768

Closed
wants to merge 7 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions docs/content/tutorial/step_03.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ Let's see an example:
});
```

```html
<body>
<!-- The following line is how to use the `greetUser` component above in your html doc. -->
<greet-user></greet-user>
</body>
```
joej164 marked this conversation as resolved.
Show resolved Hide resolved

Now, every time we include `<greet-user></greet-user>` in our view, AngularJS will expand it into a
DOM sub-tree constructed using the provided `template` and managed by an instance of the specified
controller.
Expand Down Expand Up @@ -127,7 +134,7 @@ acquired skill.
<body>

<!-- Use a custom component to render a list of phones -->
<phone-list></phone-list>
<phone-list></phone-list> <!-- This tells AngularJS to instantiate a `phoneList` component here. -->

</body>
</html>
Expand All @@ -148,7 +155,7 @@ angular.module('phonecatApp', []);
// Register `phoneList` component, along with its associated controller and template
angular.
module('phonecatApp').
component('phoneList', {
component('phoneList', { // This name is what AngularJS uses to match to the `<phone-list>` element.
template:
'<ul>' +
'<li ng-repeat="phone in $ctrl.phones">' +
Expand Down