-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Conversation
docs/content/tutorial/step_03.ngdoc
Outdated
@@ -127,7 +140,7 @@ acquired skill. | |||
<body> | |||
|
|||
<!-- Use a custom component to render a list of phones --> | |||
<phone-list></phone-list> | |||
<phone-list></phone-list> // This is what calls the phoneList angular.js component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Calls" is not really the right term here. How about:
This tells AngularJS to instantiate a
phoneList
component here.
docs/content/tutorial/step_03.ngdoc
Outdated
@@ -148,7 +161,7 @@ angular.module('phonecatApp', []); | |||
// Register `phoneList` component, along with its associated controller and template | |||
angular. | |||
module('phonecatApp'). | |||
component('phoneList', { | |||
component('phoneList', { // This is what defines the html element <phone-list> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name is what AngularJS uses to match to the <phone-list>
element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks better. We can squash the commits when we merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, @joej164! I left a couple of minor comments.
docs/content/tutorial/step_03.ngdoc
Outdated
@@ -127,7 +140,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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is HTML, we should use HTML comments (<!-- ... -->
).
I would also reduce the spacing (e.g. to 2 or 4 spaces).
docs/content/tutorial/step_03.ngdoc
Outdated
@@ -148,7 +161,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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would reduce the spacing (e.g. to 2 or 4 spaces).
docs/content/tutorial/step_03.ngdoc
Outdated
<body> | ||
<!-- The following line is how to use the greetUser angular.js component above in your html doc--> | ||
<greet-user></greet-user> | ||
</body> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation is the lines above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved, thanks for catching that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks inconsistent to me 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, finally got this one. I was looking at the content of the body tag, not the tag itself. Think I finally got it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more to go 😇
docs/content/tutorial/step_03.ngdoc
Outdated
@@ -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 --!> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: --!>
should be -->
.
Can you also wrap phoneList
in backticks and add a .
at the end (for consistency)?
docs/content/tutorial/step_03.ngdoc
Outdated
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stray dot before //
.
Can you also wrap <phone-list>
in backticks?
docs/content/tutorial/step_03.ngdoc
Outdated
<body> | ||
<!-- The following line is how to use the greetUser angular.js component above in your html doc--> | ||
<greet-user></greet-user> | ||
</body> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks inconsistent to me 😁
docs/content/tutorial/step_03.ngdoc
Outdated
@@ -88,6 +88,13 @@ Let's see an example: | |||
}); | |||
``` | |||
|
|||
```html | |||
<body> | |||
<!-- The following line is how to use the greetUser angular.js component above in your html doc--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
angular.js
--> AngularJS
(or just remove that altogether, since it should be clear by now that we are talking about AngularJS 😁)
Can you also wrap greetUser
in backticks, add a .
at the end and leave a space befoe the closing -->
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think I got them all.
Sorry for the delay, every time I wanted to get to this over the weekend it kept slipping my mind.
One Issue i had was I wasn't sure how to render the files into final docs to see what I was doing. Is there a link to an article on how I could have rendered the page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing. LGTM otherwise.
Thx for following through, @joej164 👍
docs/content/tutorial/step_03.ngdoc
Outdated
```html | ||
<body> | ||
<!-- The following line is how to use the `greetUser` component above in your html doc. --> | ||
`<greet-user></greet-user>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the backticks from around <greet-user></greet-user>
here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did that also. Thanks for being patient.
Merged 🎉 Thx, @joej164 👍 |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Updates documentation to clarify the controller naming convention for first time users of angular.js
What is the current behavior? (You can also link to an open issue here)
Not as clear as it could be
What is the new behavior (if this is a feature change)?
Improved documentation
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements
Other information:
Due to me messing up my previous PR with a commit from a work account, i closed that PR and opened a new one. Please reference comments about that at the link below
#16740 (comment)