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

Update concepts.ngdoc #6639

Closed
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion docs/content/guide/concepts.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The loaded, transformed and rendered DOM is then called the <a name="view">"view

The first kind of new markup are the so called <a name="directive">"{@link directive directives}"</a>.
They apply special behavior to attributes or elements in the HTML. In the example above we use the
{@link ng.directive:ngApp `ng-app`} attribute, which is linked to a directive that automatically
{@link ng.directive:ngApp `ng-init`} attribute, which is linked to a directive that automatically
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ng-app is correct, here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, ng-app is correct there. @IamAnn ng-init allows you to set a scope variable to something or execute scope functions when the template first initializes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@petebacondarwin, would it be good to maybe show the extra markup in the source viewer in the docs? I think this is causing confusion

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I didn't find any "ng-app" in this example. Only "ng-init" is defined on the first line in this example, am I correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the docs app is not showing it, it gets added programmatically, we need to fix that in the docs app because it's confusing

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see what's the problem here. I'm wrong. You're correct. Sorry for the trouble. But I do think it's better to show the whole markups in the source viewer as caitp suggested. Thanks for your time

initializes our application. Angular also defines a directive for the {@link ng.directive:input `input`}
element that adds extra behavior to the element. E.g. it is able to automatically validate that the entered
text is non empty by evaluating the `required` attribute.
Expand Down