mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-17 11:11:05 +00:00
fixing broken links
This commit is contained in:
parent
3616716615
commit
924ffafc51
13 changed files with 15 additions and 18 deletions
|
|
@ -32,8 +32,8 @@ attribute. So why have two different ways to do the same thing? The answer is th
|
||||||
matters, but we have no control over the order in which attributes are read. To solve this
|
matters, but we have no control over the order in which attributes are read. To solve this
|
||||||
we apply attribute widget before the directive.
|
we apply attribute widget before the directive.
|
||||||
|
|
||||||
For example, consider this piece of HTML, which uses the directives `ng:repeat`, `ng:init`,
|
For example, consider this piece of HTML, which uses the `ng:repeat`, `ng:init`,
|
||||||
and `ng:bind`:
|
and `ng:bind` widget and directives:
|
||||||
<pre>
|
<pre>
|
||||||
<ul ng:init="people=['mike', 'mary']">
|
<ul ng:init="people=['mike', 'mary']">
|
||||||
<li ng:repeat="person in people" ng:init="a=a+1" ng:bind="person"></li>
|
<li ng:repeat="person in people" ng:init="a=a+1" ng:bind="person"></li>
|
||||||
|
|
@ -41,7 +41,7 @@ and `ng:bind`:
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
Notice that the order of execution matters here. We need to execute
|
Notice that the order of execution matters here. We need to execute
|
||||||
{@link angular.directive.ng:repeat ng:repeat} before we run the
|
{@link angular.widget.@ng:repeat ng:repeat} before we run the
|
||||||
{@link angular.directive.ng:init ng:init} and `ng:bind` on the `<li/>;`. This is because we
|
{@link angular.directive.ng:init ng:init} and `ng:bind` on the `<li/>;`. This is because we
|
||||||
want to run the `ng:init="a=a+1` and `ng:bind="person"` once for each person in people. We
|
want to run the `ng:init="a=a+1` and `ng:bind="person"` once for each person in people. We
|
||||||
could not have used directive to create this template because attributes are read in an
|
could not have used directive to create this template because attributes are read in an
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ allow a user to enter data.
|
||||||
|
|
||||||
# Things to notice
|
# Things to notice
|
||||||
|
|
||||||
* The user data model is initialized {@link angular.ng:controller controller} and is available in
|
* The user data model is initialized {@link angular.directive.@ng:controller controller} and is available in
|
||||||
the {@link angular.scope scope} with the initial data.
|
the {@link angular.scope scope} with the initial data.
|
||||||
* For debugging purposes we have included a debug view of the model to better understand what
|
* For debugging purposes we have included a debug view of the model to better understand what
|
||||||
is going on.
|
is going on.
|
||||||
|
|
|
||||||
|
|
@ -122,4 +122,4 @@ no connection between the controller and the view.
|
||||||
* The view can call any controller function.
|
* The view can call any controller function.
|
||||||
* In this example, the `setUrl()` and `readUrl()` functions copy the game state to/from the URL's
|
* In this example, the `setUrl()` and `readUrl()` functions copy the game state to/from the URL's
|
||||||
hash so the browser's back button will undo game steps. See deep-linking. This example calls
|
hash so the browser's back button will undo game steps. See deep-linking. This example calls
|
||||||
{@link angular.Scope.$watch $watch()} to set up a listener that invokes `readUrl()` when needed.
|
{@link angular.scope.$watch $watch()} to set up a listener that invokes `readUrl()` when needed.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ by a solid red border, for example:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
You can try to evaluate malformed expressions in {@link angualr.expression expression} to see the
|
You can try to evaluate malformed expressions in {@link guide.expression expression} to see the
|
||||||
`ng-exception` class' styling.
|
`ng-exception` class' styling.
|
||||||
|
|
||||||
## `ng-validation-error`
|
## `ng-validation-error`
|
||||||
|
|
@ -125,7 +125,7 @@ dependency injection since the caller is still responsible for retrieving the de
|
||||||
dependency injection is like Chuck Norris. Chuck does not ask for dependencies; he declares them.*
|
dependency injection is like Chuck Norris. Chuck does not ask for dependencies; he declares them.*
|
||||||
|
|
||||||
The most common place to use dependency injection in angular applications is in
|
The most common place to use dependency injection in angular applications is in
|
||||||
{@link angular.ng:controller controllers}. Here’s a simple example:
|
{@link angular.directive.@ng:controller controllers}. Here’s a simple example:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
function MyController($route){
|
function MyController($route){
|
||||||
|
|
@ -31,7 +31,4 @@
|
||||||
* {@link angular.service Service} - Objects that are wired through dependency injection and then
|
* {@link angular.service Service} - Objects that are wired through dependency injection and then
|
||||||
injected into the root scope.
|
injected into the root scope.
|
||||||
* {@link guide.testing Testing}
|
* {@link guide.testing Testing}
|
||||||
* service:$browser(mock)
|
* service:$browser(mock)
|
||||||
* {@link downloading Downloading} - How to download, compile, and host the angular
|
|
||||||
environment on your own server.
|
|
||||||
* {@link guide.contribute Contributing} - How to contribute to angular project.
|
|
||||||
|
|
@ -112,7 +112,7 @@ These input widgets look normal enough, but consider these points:
|
||||||
of the input widgets (`qty` and `cost`) to variables of the same name. Think of those variables as
|
of the input widgets (`qty` and `cost`) to variables of the same name. Think of those variables as
|
||||||
the "Model" part of the Model-View-Controller design pattern.
|
the "Model" part of the Model-View-Controller design pattern.
|
||||||
* Note the angular directives, {@link angular.widget.@ng:validate ng:validate} and {@link
|
* Note the angular directives, {@link angular.widget.@ng:validate ng:validate} and {@link
|
||||||
ngular.widget.@ng:required ng:required}. You may have noticed that when you enter invalid data or
|
angular.widget.@ng:required ng:required}. You may have noticed that when you enter invalid data or
|
||||||
leave the the input fields blank, the borders turn a plainly irritated red color, and the display
|
leave the the input fields blank, the borders turn a plainly irritated red color, and the display
|
||||||
value disappears. These `ng:` directives make it easier to implement field validators than coding
|
value disappears. These `ng:` directives make it easier to implement field validators than coding
|
||||||
them in JavaScript, no? Yes.
|
them in JavaScript, no? Yes.
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ attacks. angular does round-trip escaping on all strings for you.
|
||||||
|
|
||||||
### Can I download the source, build, and host the angular environment locally?
|
### Can I download the source, build, and host the angular environment locally?
|
||||||
|
|
||||||
Yes. See instructions in {@link downloading downloading}.
|
Yes. See instructions in {@link intro.downloading downloading}.
|
||||||
|
|
||||||
### Is angular a templating system?
|
### Is angular a templating system?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ data, and logic components:
|
||||||
|
|
||||||
|
|
||||||
* The name of our controller function (in the JavaScript file `controllers.js`) matches the
|
* The name of our controller function (in the JavaScript file `controllers.js`) matches the
|
||||||
{@link angular.directive.ng:controller ng:controller} directive in the `<body>` tag
|
{@link angular.directive.@ng:controller ng:controller} directive in the `<body>` tag
|
||||||
(`PhoneListCtrl`).
|
(`PhoneListCtrl`).
|
||||||
* We instantiated our data within the scope of our controller function, and our template
|
* We instantiated our data within the scope of our controller function, and our template
|
||||||
binding points are located within the block bounded by the `<body ng:controller="PhoneListCtrl">`
|
binding points are located within the block bounded by the `<body ng:controller="PhoneListCtrl">`
|
||||||
|
|
@ -145,7 +145,7 @@ the template, model and controller all work together. Angular uses scopes, along
|
||||||
information contained in the template, data model, and controller, to keep the model and view
|
information contained in the template, data model, and controller, to keep the model and view
|
||||||
separated but in sync. Any changes to the model are reflected in the view; any changes that occur
|
separated but in sync. Any changes to the model are reflected in the view; any changes that occur
|
||||||
in the view are reflected in the model. To learn more about angular scopes, see the {@link
|
in the view are reflected in the model. To learn more about angular scopes, see the {@link
|
||||||
angular.scopes angular scope documentation}.
|
angular.scope angular scope documentation}.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ Now when you click on a
|
||||||
phone on the list, the phone details page with phone-specific information is displayed.
|
phone on the list, the phone details page with phone-specific information is displayed.
|
||||||
|
|
||||||
|
|
||||||
To implement the phone details view we will use {@link angular.services.$xhr $xhr} to fetch our
|
To implement the phone details view we will use {@link angular.service.$xhr $xhr} to fetch our
|
||||||
data, and we'll flesh out the `phone-details.html` view template.
|
data, and we'll flesh out the `phone-details.html` view template.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ your development with the {@link https://github.com/angular/angular-seed angular
|
||||||
|
|
||||||
We hope this tutorial was useful to you and that you learned enough about angular to make you want
|
We hope this tutorial was useful to you and that you learned enough about angular to make you want
|
||||||
to learn more. We especially hope you are inspired to go out and develop angular web apps of your
|
to learn more. We especially hope you are inspired to go out and develop angular web apps of your
|
||||||
own, and that you might be interested in {@link contribute contributing} to angular.
|
own, and that you might be interested in {@link intro.contribute contributing} to angular.
|
||||||
|
|
||||||
If you have questions or feedback or just want to say "hi", please post a message at {@link
|
If you have questions or feedback or just want to say "hi", please post a message at {@link
|
||||||
https://groups.google.com/forum/#!forum/angular}.
|
https://groups.google.com/forum/#!forum/angular}.
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ angularDirective("ng:init", function(expression){
|
||||||
/**
|
/**
|
||||||
* @workInProgress
|
* @workInProgress
|
||||||
* @ngdoc directive
|
* @ngdoc directive
|
||||||
* @name angular.directive.ng:controller
|
* @name angular.directive.@ng:controller
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
* The `ng:controller` directive assigns behavior to a scope. This is a key aspect of how angular
|
* The `ng:controller` directive assigns behavior to a scope. This is a key aspect of how angular
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue