mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-12 17:03:09 +00:00
docs: fix broken links to $compileProvider.directive()
This commit is contained in:
parent
8d66af11e6
commit
5074448443
5 changed files with 10 additions and 10 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
Angular's {@link api/ng.$compile HTML compiler} allows the developer to teach the
|
Angular's {@link api/ng.$compile HTML compiler} allows the developer to teach the
|
||||||
browser new HTML syntax. The compiler allows you to attach behavior to any HTML element or attribute
|
browser new HTML syntax. The compiler allows you to attach behavior to any HTML element or attribute
|
||||||
and even create new HTML element or attributes with custom behavior. Angular calls these behavior
|
and even create new HTML element or attributes with custom behavior. Angular calls these behavior
|
||||||
extensions {@link api/ng.$compileProvider.directive directives}.
|
extensions {@link api/ng.$compileProvider#directive directives}.
|
||||||
|
|
||||||
HTML has a lot of constructs for formatting the HTML for static documents in declarative fashion.
|
HTML has a lot of constructs for formatting the HTML for static documents in declarative fashion.
|
||||||
For example if something needs to be centered, there is no need to provide instructions to the
|
For example if something needs to be centered, there is no need to provide instructions to the
|
||||||
|
|
@ -60,7 +60,7 @@ api/ng.directive:ngBind `ng-bind`} directive.
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
Directive is just a function which executes when the compiler encounters it in the DOM. See {@link
|
Directive is just a function which executes when the compiler encounters it in the DOM. See {@link
|
||||||
api/ng.$compileProvider.directive directive API} for in-depth documentation on how
|
api/ng.$compileProvider#directive directive API} for in-depth documentation on how
|
||||||
to write directives.
|
to write directives.
|
||||||
|
|
||||||
Here is a directive which makes any element draggable. Notice the `draggable` attribute on the
|
Here is a directive which makes any element draggable. Notice the `draggable` attribute on the
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ watch {@link guide/expression expressions} and propagate events.
|
||||||
## Scope as Data-Model
|
## Scope as Data-Model
|
||||||
|
|
||||||
Scope is the glue between application controller and the view. During the template {@link compiler
|
Scope is the glue between application controller and the view. During the template {@link compiler
|
||||||
linking} phase the {@link api/ng.$compileProvider.directive directives} set up
|
linking} phase the {@link api/ng.$compileProvider#directive directives} set up
|
||||||
{@link api/ng.$rootScope.Scope#$watch `$watch`} expressions on the scope. The
|
{@link api/ng.$rootScope.Scope#$watch `$watch`} expressions on the scope. The
|
||||||
`$watch` allows the directives to be notified of property changes, which allows the directive to
|
`$watch` allows the directives to be notified of property changes, which allows the directive to
|
||||||
render the updated value to the DOM.
|
render the updated value to the DOM.
|
||||||
|
|
@ -279,10 +279,10 @@ the `$digest` phase. This delay is desirable, since it coalesces multiple model
|
||||||
### Scopes and Directives
|
### Scopes and Directives
|
||||||
|
|
||||||
During the compilation phase, the {@link compiler compiler} matches {@link
|
During the compilation phase, the {@link compiler compiler} matches {@link
|
||||||
api/ng.$compileProvider.directive directives} against the DOM template. The directives
|
api/ng.$compileProvider#directive directives} against the DOM template. The directives
|
||||||
usually fall into one of two categories:
|
usually fall into one of two categories:
|
||||||
|
|
||||||
- Observing {@link api/ng.$compileProvider.directive directives}, such as
|
- Observing {@link api/ng.$compileProvider#directive directives}, such as
|
||||||
double-curly expressions `{{expression}}`, register listeners using the {@link
|
double-curly expressions `{{expression}}`, register listeners using the {@link
|
||||||
api/ng.$rootScope.Scope#$watch $watch()} method. This type of directive needs
|
api/ng.$rootScope.Scope#$watch $watch()} method. This type of directive needs
|
||||||
to be notified whenever the expression changes so that it can update the view.
|
to be notified whenever the expression changes so that it can update the view.
|
||||||
|
|
@ -299,7 +299,7 @@ correctly.
|
||||||
|
|
||||||
### Directives that Create Scopes
|
### Directives that Create Scopes
|
||||||
|
|
||||||
In most cases, {@link api/ng.$compileProvider.directive directives} and scopes interact
|
In most cases, {@link api/ng.$compileProvider#directive directives} and scopes interact
|
||||||
but do not create new instances of scope. However, some directives, such as {@link
|
but do not create new instances of scope. However, some directives, such as {@link
|
||||||
api/ng.directive:ngController ng-controller} and {@link
|
api/ng.directive:ngController ng-controller} and {@link
|
||||||
api/ng.directive:ngRepeat ng-repeat}, create new child scopes
|
api/ng.directive:ngRepeat ng-repeat}, create new child scopes
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ function setupModuleLoader(window) {
|
||||||
* @param {Function} directiveFactory Factory function for creating new instance of
|
* @param {Function} directiveFactory Factory function for creating new instance of
|
||||||
* directives.
|
* directives.
|
||||||
* @description
|
* @description
|
||||||
* See {@link ng.$compileProvider.directive $compileProvider.directive()}.
|
* See {@link ng.$compileProvider#directive $compileProvider.directive()}.
|
||||||
*/
|
*/
|
||||||
directive: invokeLater('$compileProvider', 'directive'),
|
directive: invokeLater('$compileProvider', 'directive'),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ var NON_ASSIGNABLE_MODEL_EXPRESSION = 'Non-assignable model expression: ';
|
||||||
* can then be used to link {@link ng.$rootScope.Scope scope} and the template together.
|
* can then be used to link {@link ng.$rootScope.Scope scope} and the template together.
|
||||||
*
|
*
|
||||||
* The compilation is a process of walking the DOM tree and trying to match DOM elements to
|
* The compilation is a process of walking the DOM tree and trying to match DOM elements to
|
||||||
* {@link ng.$compileProvider.directive directives}. For each match it
|
* {@link ng.$compileProvider#directive directives}. For each match it
|
||||||
* executes corresponding template function and collects the
|
* executes corresponding template function and collects the
|
||||||
* instance functions into a single template function which is then returned.
|
* instance functions into a single template function which is then returned.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -326,9 +326,9 @@ function $RootScopeProvider(){
|
||||||
*
|
*
|
||||||
* Usually you don't call `$digest()` directly in
|
* Usually you don't call `$digest()` directly in
|
||||||
* {@link ng.directive:ngController controllers} or in
|
* {@link ng.directive:ngController controllers} or in
|
||||||
* {@link ng.$compileProvider.directive directives}.
|
* {@link ng.$compileProvider#directive directives}.
|
||||||
* Instead a call to {@link ng.$rootScope.Scope#$apply $apply()} (typically from within a
|
* Instead a call to {@link ng.$rootScope.Scope#$apply $apply()} (typically from within a
|
||||||
* {@link ng.$compileProvider.directive directives}) will force a `$digest()`.
|
* {@link ng.$compileProvider#directive directives}) will force a `$digest()`.
|
||||||
*
|
*
|
||||||
* If you want to be notified whenever `$digest()` is called,
|
* If you want to be notified whenever `$digest()` is called,
|
||||||
* you can register a `watchExpression` function with {@link ng.$rootScope.Scope#$watch $watch()}
|
* you can register a `watchExpression` function with {@link ng.$rootScope.Scope#$watch $watch()}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue