mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-06-16 18:29:57 +08:00
docs(*): fix dangling links
Fix many dangling links
This commit is contained in:
committed by
Peter Bacon Darwin
parent
257a3f35dc
commit
aa99df9e53
@@ -242,7 +242,7 @@ Use ngSanitize to securely parse and manipulate HTML data in your application.
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{@link ngTouch#filter Filters}
|
||||
{@link ngSanitize#filter Filters}
|
||||
</td>
|
||||
<td>
|
||||
The {@link ngSanitize.filter:linky linky filter} is used to turn URLs into HTML links within the provided string.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@fullName Missing Required Controller
|
||||
@description
|
||||
|
||||
This error occurs when {@link ng.$compile HTML compiler} tries to process a directive that specifies the {@link ng.$compile#description_comprehensive-directive-api_directive-definition-object `require` option} in a {@link ng.$compile#description_comprehensive-directive-api directive definition},
|
||||
This error occurs when {@link ng.$compile HTML compiler} tries to process a directive that specifies the {@link ng.$compile#directive-definition-object `require` option} in a {@link ng.$compile#comprehensive-directive-api directive definition},
|
||||
but the required directive controller is not present on the current DOM element (or its ancestor element, if `^` was specified).
|
||||
|
||||
To resolve this error ensure that there is no typo in the required controller name and that the required directive controller is present on the current element.
|
||||
|
||||
@@ -21,5 +21,5 @@ myModule.directive('directiveName', function factory() {
|
||||
});
|
||||
```
|
||||
|
||||
Please refer to the {@link ng.$compile#description_comprehensive-directive-api_directive-definition-object
|
||||
Please refer to the {@link ng.$compile#directive-definition-object
|
||||
`scope` option} of the directive definition documentation to learn more about the API.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@description
|
||||
|
||||
This error occurs when a directive defines an isolate scope property
|
||||
(using the `=` mode in the {@link ng.$compile#description_comprehensive-directive-api_directive-definition-object
|
||||
(using the `=` mode in the {@link ng.$compile#directive-definition-object
|
||||
`scope` option} of a directive definition) but the directive is used with an expression that is not-assignable.
|
||||
|
||||
In order for the two-way data-binding to work, it must be possible to write new values back into the path defined with the expression.
|
||||
|
||||
@@ -51,4 +51,4 @@ angular.module("myApp", [])
|
||||
```
|
||||
|
||||
For more information about strict-di mode, see {@link ng.directive:ngApp ngApp}
|
||||
and {@link api/angular.bootstrap angular.bootstrap}.
|
||||
and {@link angular.bootstrap angular.bootstrap}.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@description
|
||||
|
||||
If you configure {@link ng.$location `$location`} to use
|
||||
{@link api/ng.provider.$locationProvider `html5Mode`} (`history.pushState`), you need to specify the base URL for the application with a [`<base href="">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) tag or configure
|
||||
{@link $locationProvider `html5Mode`} (`history.pushState`), you need to specify the base URL for the application with a [`<base href="">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) tag or configure
|
||||
`$locationProvider` to not require a base tag by passing a definition object with
|
||||
`requireBase:false` to `$locationProvider.html5Mode()`:
|
||||
|
||||
@@ -60,4 +60,4 @@ API](http://caniuse.com/#feat=history), the fallback mechanism provided by `$loc
|
||||
won't work well without specifying the base url of the application.
|
||||
|
||||
In order to make it easier to migrate from hashbang mode to html5 mode, we require that the base
|
||||
URL is always specified when `$location`'s `html5mode` is enabled.
|
||||
URL is always specified when `$location`'s `html5mode` is enabled.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@fullName Invalid matcher (only string patterns and RegExp instances are supported)
|
||||
@description
|
||||
|
||||
Please see {@link ng.$sceDelegateProvider#resourceUrlWhitelist
|
||||
Please see {@link $sceDelegateProvider#resourceUrlWhitelist
|
||||
$sceDelegateProvider.resourceUrlWhitelist} and {@link
|
||||
api/ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist} for the
|
||||
$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist} for the
|
||||
list of acceptable items.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@fullName The sequence *** is not a valid pattern wildcard
|
||||
@description
|
||||
|
||||
The strings in {@link ng.$sceDelegateProvider#resourceUrlWhitelist
|
||||
The strings in {@link $sceDelegateProvider#resourceUrlWhitelist
|
||||
$sceDelegateProvider.resourceUrlWhitelist} and {@link
|
||||
api/ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist} may not
|
||||
$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist} may not
|
||||
contain the undefined sequence `***`. Only `*` and `**` wildcard patterns are defined.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@fullName Unsupported Selector Lookup
|
||||
@description
|
||||
|
||||
In order to keep Angular small, Angular implements only a subset of the selectors in {@link angular.element#description_angulars-jqlite jqLite}.
|
||||
In order to keep Angular small, Angular implements only a subset of the selectors in {@link angular.element#angular-s-jqlite jqLite}.
|
||||
This error occurs when a jqLite instance is invoked with a selector other than this subset.
|
||||
|
||||
In order to resolve this error, rewrite your code to only use tag name selectors and manually traverse the DOM using the APIs provided by jqLite.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@description
|
||||
|
||||
This error occurs when attempting to copy an object to itself. Calling {@link
|
||||
api/angular.copy angular.copy} with a `destination` object deletes
|
||||
angular.copy angular.copy} with a `destination` object deletes
|
||||
all of the elements or properties on `destination` before copying to it. Copying
|
||||
an object to itself is not supported. Make sure to check your calls to
|
||||
`angular.copy` and avoid copying objects or arrays to themselves.
|
||||
|
||||
@@ -245,13 +245,13 @@ The table below explains in detail which animation events are triggered
|
||||
|
||||
| Directive | Supported Animations |
|
||||
|-------------------------------------------------------------------------------------|------------------------------------------|
|
||||
| {@link ng.directive:ngRepeat#usage_animations ngRepeat} | enter, leave, and move |
|
||||
| {@link ngRoute.directive:ngView#usage_animations ngView} | enter and leave |
|
||||
| {@link ng.directive:ngInclude#usage_animations ngInclude} | enter and leave |
|
||||
| {@link ng.directive:ngSwitch#usage_animations ngSwitch} | enter and leave |
|
||||
| {@link ng.directive:ngIf#usage_animations ngIf} | enter and leave |
|
||||
| {@link ng.directive:ngClass#usage_animations ngClass or {{class}}} | add and remove |
|
||||
| {@link ng.directive:ngShow#usage_animations ngShow & ngHide} | add and remove (the ng-hide class value) |
|
||||
| {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave, and move |
|
||||
| {@link ngRoute.directive:ngView#animations ngView} | enter and leave |
|
||||
| {@link ng.directive:ngInclude#animations ngInclude} | enter and leave |
|
||||
| {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave |
|
||||
| {@link ng.directive:ngIf#animations ngIf} | enter and leave |
|
||||
| {@link ng.directive:ngClass#animations ngClass or {{class}}} | add and remove |
|
||||
| {@link ng.directive:ngShow#animations ngShow & ngHide} | add and remove (the ng-hide class value) |
|
||||
|
||||
For a full breakdown of the steps involved during each animation event, refer to the {@link ngAnimate.$animate API docs}.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Angular sets these CSS classes. It is up to your application to provide useful s
|
||||
# CSS classes used by angular
|
||||
|
||||
* `ng-scope`
|
||||
- **Usage:** angular applies this class to any element for which a new {@link api/ng.$rootScope.Scope scope}
|
||||
- **Usage:** angular applies this class to any element for which a new {@link $rootScope scope}
|
||||
is defined. (see {@link guide/scope scope} guide for more information about scopes)
|
||||
|
||||
* `ng-binding`
|
||||
|
||||
@@ -180,7 +180,7 @@ For example, we could fix the example above by instead writing:
|
||||
First let's talk about the {@link ng.$compileProvider#directive API for registering directives}. Much like
|
||||
controllers, directives are registered on modules. To register a directive, you use the
|
||||
`module.directive` API. `module.directive` takes the
|
||||
{@link guide/directive#creating-custom-directives_matching-directives normalized} directive name
|
||||
{@link guide/directive#matching-directives normalized} directive name
|
||||
followed by a **factory function.** This factory function should return an object with the different
|
||||
options to tell `$compile` how the directive should behave when matched.
|
||||
|
||||
@@ -243,7 +243,7 @@ Let's create a directive that simply replaces its contents with a static templat
|
||||
Notice that we have bindings in this directive. After `$compile` compiles and links
|
||||
`<div my-customer></div>`, it will try to match directives on the element's children. This means you
|
||||
can compose directives of other directives. We'll see how to do that in
|
||||
{@link guide/directive#creating-custom-directives_demo_creating-directives-that-communicate an example}
|
||||
{@link guide/directive#creating-directives-that-communicate an example}
|
||||
below.
|
||||
|
||||
In the example above we in-lined the value of the `template` option, but this will become annoying
|
||||
@@ -328,9 +328,9 @@ Let's change our directive to use `restrict: 'E'`:
|
||||
</example>
|
||||
|
||||
For more on the
|
||||
{@link ng.$compile#description_comprehensive-directive-api_directive-definition-object `restrict`}
|
||||
{@link ng.$compile#directive-definition-object `restrict`}
|
||||
property, see the
|
||||
{@link ng.$compile#description_comprehensive-directive-api_directive-definition-object API docs}.
|
||||
{@link ng.$compile#directive-definition-object API docs}.
|
||||
|
||||
<div class="alert alert-info">
|
||||
**When should I use an attribute versus an element?**
|
||||
@@ -509,7 +509,7 @@ that you explicitly pass in.
|
||||
|
||||
<div class="alert alert-warning">
|
||||
**Note:** Normally, a scope prototypically inherits from its parent. An isolated scope does not.
|
||||
See the {@link api/ng/service/$compile#directive-definition-object
|
||||
See the {@link $compile#directive-definition-object
|
||||
"Directive Definition Object - scope"} section for more information about isolate scopes.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ filter the list of items.
|
||||
|
||||
## Example
|
||||
See the [angular-seed](https://github.com/angular/angular-seed) project for more examples, or look
|
||||
at the embedded examples in the Angular documentation (For example, [$http](http://docs.angularjs.org/api/ng/service/$http)
|
||||
at the embedded examples in the Angular documentation (For example, {@link $http $http}
|
||||
has an end to end test in the example under the `protractor.js` tag).
|
||||
|
||||
## Caveats
|
||||
|
||||
@@ -276,11 +276,11 @@ To get a hold of the controller the directive specifies a dependency as shown in
|
||||
The validation can occur in two places:
|
||||
|
||||
* **Model to View update** -
|
||||
Whenever the bound model changes, all functions in {@link ngModel.NgModelController#properties_$formatters NgModelController#$formatters} array are pipe-lined, so that each of these functions has an opportunity to format the value and change validity state of the form control through {@link ngModel.NgModelController#$setValidity NgModelController#$setValidity}.
|
||||
Whenever the bound model changes, all functions in {@link ngModel.NgModelController#$formatters NgModelController#$formatters} array are pipe-lined, so that each of these functions has an opportunity to format the value and change validity state of the form control through {@link ngModel.NgModelController#$setValidity NgModelController#$setValidity}.
|
||||
|
||||
* **View to Model update** -
|
||||
In a similar way, whenever a user interacts with a control it calls {@link ngModel.NgModelController#$setViewValue NgModelController#$setViewValue}.
|
||||
This in turn pipelines all functions in the {@link ngModel.NgModelController#properties_$parsers NgModelController#$parsers} array, so that each of these functions has an opportunity to convert the value and change validity state of the form control through {@link ngModel.NgModelController#$setValidity NgModelController#$setValidity}.
|
||||
This in turn pipelines all functions in the {@link ngModel.NgModelController#$parsers NgModelController#$parsers} array, so that each of these functions has an opportunity to convert the value and change validity state of the form control through {@link ngModel.NgModelController#$setValidity NgModelController#$setValidity}.
|
||||
|
||||
In the following example we create two directives.
|
||||
|
||||
@@ -366,7 +366,7 @@ However, if you need more flexibility, you can write your own form control as a
|
||||
|
||||
In order for custom control to work with `ngModel` and to achieve two-way data-binding it needs to:
|
||||
|
||||
- implement `$render` method, which is responsible for rendering the data after it passed the {@link api/ng.directive:ngModel.NgModelController#properties_$formatters NgModelController#$formatters},
|
||||
- implement `$render` method, which is responsible for rendering the data after it passed the {@link ngModel.NgModelController#$formatters NgModelController#$formatters},
|
||||
- call `$setViewValue` method, whenever the user interacts with the control and model needs to be updated. This is usually done inside a DOM Event listener.
|
||||
|
||||
See {@link guide/directive $compileProvider.directive} for more info.
|
||||
|
||||
@@ -194,7 +194,7 @@ $httpProvider.interceptors.push('myHttpInterceptor');
|
||||
```
|
||||
|
||||
More details on the new interceptors API (which has been around as of v1.1.4) can be found at
|
||||
https://docs.angularjs.org/api/ng/service/$http#interceptors
|
||||
{@link $http#interceptors interceptors}
|
||||
|
||||
|
||||
- **injector:** due to [c0b4e2db](https://github.com/angular/angular.js/commit/c0b4e2db9cbc8bc3164cedc4646145d3ab72536e),
|
||||
@@ -401,16 +401,16 @@ below should still apply, but you may want to consult the
|
||||
<li class="nav-header">Summary of Breaking Changes</li>
|
||||
<li>{@link guide/migration#ngroute-has-been-moved-into-its-own-module ngRoute has been moved into its own module}</li>
|
||||
<li>{@link guide/migration#templates-no-longer-automatically-unwrap-promises Templates no longer automatically unwrap promises}</li>
|
||||
<li>{@link guide/migration#syntax-for-named-wildcard-parameters-changed-in Syntax for named wildcard parameters changed in <code>$route</code>}</li>
|
||||
<li>{@link guide/migration#you-can-only-bind-one-expression-to You can only bind one expression to <code>*[src]</code>, <code>*[ng-src]</code> or <code>action</code>}</li>
|
||||
<li>{@link guide/migration#syntax-for-named-wildcard-parameters-changed-in-route- Syntax for named wildcard parameters changed in <code>$route</code>}</li>
|
||||
<li>{@link guide/migration#you-can-only-bind-one-expression-to-src-ng-src-or-action- You can only bind one expression to <code>*[src]</code>, <code>*[ng-src]</code> or <code>action</code>}</li>
|
||||
<li>{@link guide/migration#interpolations-inside-dom-event-handlers-are-now-disallowed Interpolations inside DOM event handlers are now disallowed}</li>
|
||||
<li>{@link guide/migration#directives-cannot-end-with--start-or--end Directives cannot end with -start or -end}</li>
|
||||
<li>{@link guide/migration#in-$q,-promisealways-has-been-renamed-promisefinally In $q, promise.always has been renamed promise.finally}</li>
|
||||
<li>{@link guide/migration#directives-cannot-end-with-start-or-end Directives cannot end with -start or -end}</li>
|
||||
<li>{@link guide/migration#in-q-promise-always-has-been-renamed-promise-finally In $q, promise.always has been renamed promise.finally}</li>
|
||||
<li>{@link guide/migration#ngmobile-is-now-ngtouch ngMobile is now ngTouch}</li>
|
||||
<li>{@link guide/migration#resource$then-has-been-removed resource.$then has been removed}</li>
|
||||
<li>{@link guide/migration#resource-then-has-been-removed resource.$then has been removed}</li>
|
||||
<li>{@link guide/migration#resource-methods-return-the-promise Resource methods return the promise}</li>
|
||||
<li>{@link guide/migration#resource-promises-are-resolved-with-the-resource-instance Resource promises are resolved with the resource instance}</li>
|
||||
<li>{@link guide/migration#$locationsearch-supports-multiple-keys $location.search supports multiple keys}</li>
|
||||
<li>{@link guide/migration#-location-search-supports-multiple-keys $location.search supports multiple keys}</li>
|
||||
<li>{@link guide/migration#ngbindhtmlunsafe-has-been-removed-and-replaced-by-ngbindhtml ngBindHtmlUnsafe has been removed and replaced by ngBindHtml}</li>
|
||||
<li>{@link guide/migration#form-names-that-are-expressions-are-evaluated Form names that are expressions are evaluated}</li>
|
||||
<li>{@link guide/migration#hasownproperty-disallowed-as-an-input-name hasOwnProperty disallowed as an input name}</li>
|
||||
@@ -421,8 +421,8 @@ below should still apply, but you may want to consult the
|
||||
<li>{@link guide/migration#urls-are-now-sanitized-against-a-whitelist URLs are now sanitized against a whitelist}</li>
|
||||
<li>{@link guide/migration#isolate-scope-only-exposed-to-directives-with-scope-property Isolate scope only exposed to directives with <code>scope</code> property}</li>
|
||||
<li>{@link guide/migration#change-to-interpolation-priority Change to interpolation priority}</li>
|
||||
<li>{@link guide/migration#underscore-prefixed/suffixed-properties-are-non-bindable Underscore-prefixed/suffixed properties are non-bindable}</li>
|
||||
<li>{@link guide/migration#you-cannot-bind-to-select[multiple] You cannot bind to select[multiple]}</li>
|
||||
<li>{@link guide/migration#underscore-prefixed-suffixed-properties-are-non-bindable Underscore-prefixed/suffixed properties are non-bindable}</li>
|
||||
<li>{@link guide/migration#you-cannot-bind-to-select-multiple- You cannot bind to select[multiple]}</li>
|
||||
<li>{@link guide/migration#uncommon-region-specific-local-files-were-removed-from-i18n Uncommon region-specific local files were removed from i18n}</li>
|
||||
<li>{@link guide/migration#services-can-now-return-functions Services can now return functions}</li>
|
||||
</ul>
|
||||
|
||||
@@ -20,7 +20,7 @@ Where the compiler has created a new scope, the scope and either `ng-scope` or `
|
||||
CSS class are attached to the corresponding element. These scope references can then be accessed via
|
||||
`element.scope()` and `element.isolateScope()`.
|
||||
|
||||
Tools like [Protractor](github.com/angular/protractor) and
|
||||
Tools like [Protractor](https://github.com/angular/protractor) and
|
||||
[Batarang](https://github.com/angular/angularjs-batarang) need this information to run,
|
||||
but you can disable this in production for a significant performance boost with:
|
||||
|
||||
@@ -40,4 +40,4 @@ angular.reloadWithDebugInfo();
|
||||
The page should reload and the debug information should now be available.
|
||||
|
||||
For more see the docs pages on {@link ng.$compileProvider#debugInfoEnabled `$compileProvider`}
|
||||
and {@link ng/function/angular.reloadWithDebugInfo `angular.reloadWithDebugInfo`}.
|
||||
and {@link angular.reloadWithDebugInfo `angular.reloadWithDebugInfo`}.
|
||||
|
||||
@@ -23,7 +23,7 @@ watch {@link guide/expression expressions} and propagate events.
|
||||
access to shared model properties. Nested scopes are either "child scopes" or "isolate scopes".
|
||||
A "child scope" (prototypically) inherits properties from its parent scope. An "isolate scope"
|
||||
does not. See {@link
|
||||
guide/directive#creating-custom-directives_demo_isolating-the-scope-of-a-directive isolated
|
||||
guide/directive#isolating-the-scope-of-a-directive isolated
|
||||
scopes} for more information.
|
||||
|
||||
- Scopes provide context against which {@link guide/expression expressions} are evaluated. For
|
||||
@@ -313,7 +313,7 @@ ng.directive:ngController ng-controller} and {@link
|
||||
ng.directive:ngRepeat ng-repeat}, create new child scopes
|
||||
and attach the child scope to the corresponding DOM element. You can retrieve a scope for any DOM
|
||||
element by using an `angular.element(aDomElement).scope()` method call.
|
||||
See the {@link guide/directive#creating-custom-directives_demo_isolating-the-scope-of-a-directive
|
||||
See the {@link guide/directive#isolating-the-scope-of-a-directive
|
||||
directives guide} for more information about isolate scopes.
|
||||
|
||||
### Controllers and Scopes
|
||||
|
||||
@@ -66,7 +66,7 @@ npm install
|
||||
|
||||
Our custom resource service will be defined in `app/js/services.js` so we need to include this file
|
||||
in our layout template. Additionally, we also need to load the `angular-resource.js` file, which
|
||||
contains the {@link api/ngResource ngResource} module:
|
||||
contains the {@link module:ngResource ngResource} module:
|
||||
|
||||
__`app/index.html`.__
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ animations on top of the template code we created before.
|
||||
* Common `ng` directives automatically trigger hooks for animations to tap into.
|
||||
* When an animation is found then the animation will run in between the standard DOM operation that
|
||||
is being issued on the element at the given time (e.g. inserting and removing nodes on
|
||||
{@link api/ng.directive:ngRepeat `ngRepeat`} or adding and removing classes on
|
||||
{@link api/ng.directive:ngClass `ngClass`}).
|
||||
{@link ngRepeat `ngRepeat`} or adding and removing classes on
|
||||
{@link ngClass `ngClass`}).
|
||||
|
||||
<div doc-tutorial-reset="12"></div>
|
||||
|
||||
@@ -81,7 +81,7 @@ To get an idea of how animations work with AngularJS, please read the
|
||||
## Template
|
||||
|
||||
The changes required within the HTML template code is to link the asset files which define the animations as
|
||||
well as the `angular-animate.js` file. The animation module, known as {@link api/ngAnimate `ngAnimate`}, is
|
||||
well as the `angular-animate.js` file. The animation module, known as {@link module:ngAnimate `ngAnimate`}, is
|
||||
defined within `angular-animate.js` and contains the code necessary to make your application become animation
|
||||
aware.
|
||||
|
||||
@@ -252,7 +252,7 @@ which are described in detail below.
|
||||
|
||||
## Animating `ngView` with CSS Keyframe Animations
|
||||
|
||||
Next let's add an animation for transitions between route changes in {@link api/ngRoute.directive:ngView `ngView`}.
|
||||
Next let's add an animation for transitions between route changes in {@link ngRoute.directive:ngView `ngView`}.
|
||||
|
||||
To start, let's add a new CSS class to our HTML like we did in the example above.
|
||||
This time, instead of the `ng-repeat` element, let's add it to the element containing the `ng-view` directive.
|
||||
|
||||
@@ -222,7 +222,7 @@ function setupModuleLoader(window) {
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and
|
||||
* See {@link ng.$animateProvider#register $animateProvider.register()} and
|
||||
* {@link ngAnimate ngAnimate module} for more information.
|
||||
*/
|
||||
animation: invokeLater('$animateProvider', 'register'),
|
||||
@@ -272,7 +272,7 @@ function setupModuleLoader(window) {
|
||||
* @description
|
||||
* Use this method to register work which needs to be performed on module loading.
|
||||
* For more about how to configure services, see
|
||||
* {@link providers#providers_provider-recipe Provider Recipe}.
|
||||
* {@link providers#provider-recipe Provider Recipe}.
|
||||
*/
|
||||
config: config,
|
||||
|
||||
|
||||
@@ -116,8 +116,8 @@
|
||||
* When this property is set to true, the HTML compiler will collect DOM nodes between
|
||||
* nodes with the attributes `directive-name-start` and `directive-name-end`, and group them
|
||||
* together as the directive elements. It is recomended that this feature be used on directives
|
||||
* which are not strictly behavioural (such as {@link api/ng.directive:ngClick ngClick}), and which
|
||||
* do not manipulate or replace child nodes (such as {@link api/ng.directive:ngInclude ngInclude}).
|
||||
* which are not strictly behavioural (such as {@link ngClick}), and which
|
||||
* do not manipulate or replace child nodes (such as {@link ngInclude}).
|
||||
*
|
||||
* #### `priority`
|
||||
* When there are multiple directives defined on a single DOM element, sometimes it
|
||||
@@ -278,7 +278,7 @@
|
||||
* You can specify `templateUrl` as a string representing the URL or as a function which takes two
|
||||
* arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns
|
||||
* a string value representing the url. In either case, the template URL is passed through {@link
|
||||
* api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
|
||||
* $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
|
||||
*
|
||||
*
|
||||
* #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)
|
||||
@@ -288,7 +288,7 @@
|
||||
* * `false` - the template will replace the contents of the directive's element.
|
||||
*
|
||||
* The replacement process migrates all of the attributes / classes from the old element to the new
|
||||
* one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive
|
||||
* one. See the {@link guide/directive#template-expanding-directive
|
||||
* Directives Guide} for an example.
|
||||
*
|
||||
* There are very few scenarios where element replacement is required for the application function,
|
||||
@@ -1063,7 +1063,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
||||
* @param {string} key Normalized key. (ie ngAttribute) .
|
||||
* @param {function(interpolatedValue)} fn Function that will be called whenever
|
||||
the interpolated value of the attribute changes.
|
||||
* See {@link ng.$compile#attributes $compile} for more info.
|
||||
* See the {@link guide/directive#text-and-attribute-bindings Directives} guide for more info.
|
||||
* @returns {function()} Returns a deregistration function for this observer.
|
||||
*/
|
||||
$observe: function(key, fn) {
|
||||
|
||||
@@ -150,7 +150,7 @@ var ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate
|
||||
*
|
||||
* You may also bypass sanitization for values you know are safe. To do so, bind to
|
||||
* an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example
|
||||
* under {@link ng.$sce#Example Strict Contextual Escaping (SCE)}.
|
||||
* under {@link ng.$sce#show-me-an-example-using-sce- Strict Contextual Escaping (SCE)}.
|
||||
*
|
||||
* Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you
|
||||
* will have an exception (instead of an exploit.)
|
||||
|
||||
@@ -255,8 +255,8 @@ function classDirective(name, selector) {
|
||||
The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.
|
||||
Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder
|
||||
any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure
|
||||
to view the step by step details of {@link ngAnimate.$animate#addclass $animate.addClass} and
|
||||
{@link ngAnimate.$animate#removeclass $animate.removeClass}.
|
||||
to view the step by step details of {@link ng.$animate#addClass $animate.addClass} and
|
||||
{@link ng.$animate#removeClass $animate.removeClass}.
|
||||
*/
|
||||
var ngClassDirective = classDirective('', true);
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
* Fetches, compiles and includes an external HTML fragment.
|
||||
*
|
||||
* By default, the template URL is restricted to the same domain and protocol as the
|
||||
* application document. This is done by calling {@link ng.$sce#getTrustedResourceUrl
|
||||
* application document. This is done by calling {@link $sce#getTrustedResourceUrl
|
||||
* $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols
|
||||
* you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or
|
||||
* [wrap them](ng.$sce#trustAsResourceUrl) as trusted values. Refer to Angular's {@link
|
||||
* {@link $sce#trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link
|
||||
* ng.$sce Strict Contextual Escaping}.
|
||||
*
|
||||
* In addition, the browser's
|
||||
|
||||
@@ -154,7 +154,7 @@ function $HttpProvider() {
|
||||
* @description
|
||||
*
|
||||
* Configure $http service to combine processing of multiple http responses received at around
|
||||
* the same time via {@link ng.$rootScope#applyAsync $rootScope.$applyAsync}. This can result in
|
||||
* the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in
|
||||
* significant performance improvement for bigger applications that make many HTTP requests
|
||||
* concurrently (common during application bootstrap).
|
||||
*
|
||||
@@ -408,7 +408,7 @@ function $HttpProvider() {
|
||||
*
|
||||
* You can change the default cache to a new object (built with
|
||||
* {@link ng.$cacheFactory `$cacheFactory`}) by updating the
|
||||
* {@link ng.$http#properties_defaults `$http.defaults.cache`} property. All requests who set
|
||||
* {@link ng.$http#defaults `$http.defaults.cache`} property. All requests who set
|
||||
* their `cache` property to `true` will now use this cache object.
|
||||
*
|
||||
* If you set the default cache to `false` then only requests that specify their own custom
|
||||
|
||||
@@ -698,7 +698,7 @@ function $LocationProvider(){
|
||||
* This change can be prevented by calling
|
||||
* `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more
|
||||
* details about event object. Upon successful change
|
||||
* {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired.
|
||||
* {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.
|
||||
*
|
||||
* The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
|
||||
* the browser supports the HTML5 History API.
|
||||
|
||||
@@ -457,7 +457,7 @@ function $SceDelegateProvider() {
|
||||
*
|
||||
* In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted
|
||||
* $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link
|
||||
* ng.$sce#parse $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the
|
||||
* ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the
|
||||
* {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.
|
||||
*
|
||||
* As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link
|
||||
@@ -956,7 +956,7 @@ function $SceProvider() {
|
||||
*
|
||||
* @description
|
||||
* Shorthand method. `$sce.parseAsHtml(expression string)` →
|
||||
* {@link ng.$sce#parse `$sce.parseAs($sce.HTML, value)`}
|
||||
* {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`}
|
||||
*
|
||||
* @param {string} expression String expression to compile.
|
||||
* @returns {function(context, locals)} a function which represents the compiled expression:
|
||||
@@ -973,7 +973,7 @@ function $SceProvider() {
|
||||
*
|
||||
* @description
|
||||
* Shorthand method. `$sce.parseAsCss(value)` →
|
||||
* {@link ng.$sce#parse `$sce.parseAs($sce.CSS, value)`}
|
||||
* {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`}
|
||||
*
|
||||
* @param {string} expression String expression to compile.
|
||||
* @returns {function(context, locals)} a function which represents the compiled expression:
|
||||
@@ -990,7 +990,7 @@ function $SceProvider() {
|
||||
*
|
||||
* @description
|
||||
* Shorthand method. `$sce.parseAsUrl(value)` →
|
||||
* {@link ng.$sce#parse `$sce.parseAs($sce.URL, value)`}
|
||||
* {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`}
|
||||
*
|
||||
* @param {string} expression String expression to compile.
|
||||
* @returns {function(context, locals)} a function which represents the compiled expression:
|
||||
@@ -1007,7 +1007,7 @@ function $SceProvider() {
|
||||
*
|
||||
* @description
|
||||
* Shorthand method. `$sce.parseAsResourceUrl(value)` →
|
||||
* {@link ng.$sce#parse `$sce.parseAs($sce.RESOURCE_URL, value)`}
|
||||
* {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`}
|
||||
*
|
||||
* @param {string} expression String expression to compile.
|
||||
* @returns {function(context, locals)} a function which represents the compiled expression:
|
||||
@@ -1024,7 +1024,7 @@ function $SceProvider() {
|
||||
*
|
||||
* @description
|
||||
* Shorthand method. `$sce.parseAsJs(value)` →
|
||||
* {@link ng.$sce#parse `$sce.parseAs($sce.JS, value)`}
|
||||
* {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`}
|
||||
*
|
||||
* @param {string} expression String expression to compile.
|
||||
* @returns {function(context, locals)} a function which represents the compiled expression:
|
||||
|
||||
@@ -19,18 +19,18 @@
|
||||
*
|
||||
* Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives:
|
||||
*
|
||||
* | Directive | Supported Animations |
|
||||
* |-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
|
||||
* | {@link ng.directive:ngRepeat#usage_animations ngRepeat} | enter, leave and move |
|
||||
* | {@link ngRoute.directive:ngView#usage_animations ngView} | enter and leave |
|
||||
* | {@link ng.directive:ngInclude#usage_animations ngInclude} | enter and leave |
|
||||
* | {@link ng.directive:ngSwitch#usage_animations ngSwitch} | enter and leave |
|
||||
* | {@link ng.directive:ngIf#usage_animations ngIf} | enter and leave |
|
||||
* | {@link ng.directive:ngClass#usage_animations ngClass} | add and remove (the CSS class(es) present) |
|
||||
* | {@link ng.directive:ngShow#usage_animations ngShow} & {@link ng.directive:ngHide#usage_animations ngHide} | add and remove (the ng-hide class value) |
|
||||
* | {@link ng.directive:form#usage_animations form} & {@link ng.directive:ngModel#usage_animations ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) |
|
||||
* | {@link ngMessages.directive:ngMessage#usage_animations ngMessages} | add and remove (ng-active & ng-inactive) |
|
||||
* | {@link ngMessages.directive:ngMessage#usage_animations ngMessage} | enter and leave |
|
||||
* | Directive | Supported Animations |
|
||||
* |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
|
||||
* | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave and move |
|
||||
* | {@link ngRoute.directive:ngView#animations ngView} | enter and leave |
|
||||
* | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave |
|
||||
* | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave |
|
||||
* | {@link ng.directive:ngIf#animations ngIf} | enter and leave |
|
||||
* | {@link ng.directive:ngClass#animations ngClass} | add and remove (the CSS class(es) present) |
|
||||
* | {@link ng.directive:ngShow#animations ngShow} & {@link ng.directive:ngHide#animations ngHide} | add and remove (the ng-hide class value) |
|
||||
* | {@link ng.directive:form#animation-hooks form} & {@link ng.directive:ngModel#animation-hooks ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) |
|
||||
* | {@link module:ngMessages#animations ngMessages} | add and remove (ng-active & ng-inactive) |
|
||||
* | {@link module:ngMessages#animations ngMessage} | enter and leave |
|
||||
*
|
||||
* You can find out more information about animations upon visiting each directive page.
|
||||
*
|
||||
|
||||
10
src/ngMock/angular-mocks.js
vendored
10
src/ngMock/angular-mocks.js
vendored
@@ -335,7 +335,7 @@ angular.mock.$LogProvider = function() {
|
||||
* @name $log#log.logs
|
||||
*
|
||||
* @description
|
||||
* Array of messages logged using {@link ng.$log#log log()}.
|
||||
* Array of messages logged using {@link ng.$log#log `log()`}.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
@@ -349,7 +349,7 @@ angular.mock.$LogProvider = function() {
|
||||
* @name $log#info.logs
|
||||
*
|
||||
* @description
|
||||
* Array of messages logged using {@link ng.$log#info info()}.
|
||||
* Array of messages logged using {@link ng.$log#info `info()`}.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
@@ -363,7 +363,7 @@ angular.mock.$LogProvider = function() {
|
||||
* @name $log#warn.logs
|
||||
*
|
||||
* @description
|
||||
* Array of messages logged using {@link ng.$log#warn warn()}.
|
||||
* Array of messages logged using {@link ng.$log#warn `warn()`}.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
@@ -377,7 +377,7 @@ angular.mock.$LogProvider = function() {
|
||||
* @name $log#error.logs
|
||||
*
|
||||
* @description
|
||||
* Array of messages logged using {@link ng.$log#error error()}.
|
||||
* Array of messages logged using {@link ng.$log#error `error()`}.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
@@ -391,7 +391,7 @@ angular.mock.$LogProvider = function() {
|
||||
* @name $log#debug.logs
|
||||
*
|
||||
* @description
|
||||
* Array of messages logged using {@link ng.$log#debug debug()}.
|
||||
* Array of messages logged using {@link ng.$log#debug `debug()`}.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
|
||||
@@ -113,7 +113,7 @@ function shallowClearAndCopy(src, dst) {
|
||||
*
|
||||
* @param {Object.<Object>=} actions Hash with declaration of custom action that should extend
|
||||
* the default set of resource actions. The declaration should be created in the format of {@link
|
||||
* ng.$http#usage_parameters $http.config}:
|
||||
* ng.$http#usage $http.config}:
|
||||
*
|
||||
* {action1: {method:?, params:?, isArray:?, headers:?, ...},
|
||||
* action2: {method:?, params:?, isArray:?, headers:?, ...},
|
||||
|
||||
Reference in New Issue
Block a user