Upgrade to angularjs 1.2.0 rc1
This commit is contained in:
parent
d223dfd662
commit
d6b021bfaf
674 changed files with 79667 additions and 62269 deletions
10
lib/angular/docs/partials/error/$animate:notcsel.html
Executable file
10
lib/angular/docs/partials/error/$animate:notcsel.html
Executable file
|
@ -0,0 +1,10 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/animate/notcsel.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Not class CSS selector</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$animate</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Expecting class selector starting with '.' got '{0}'.">Expecting class selector starting with '.' got '{0}'.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-animate-page -animate-notcsel-page"><p>Expecting a CSS selector for class. Class selectors must start with <code>.</code>, for example: <code>.my-class-name</code>.</p>
|
||||
</div></div>
|
||||
</div>
|
11
lib/angular/docs/partials/error/$cacheFactory:iid.html
Executable file
11
lib/angular/docs/partials/error/$cacheFactory:iid.html
Executable file
|
@ -0,0 +1,11 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/cacheFactory/iid.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid ID</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$cacheFactory</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="CacheId '{0}' is already taken!">CacheId '{0}' is already taken!</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-cachefactory-page -cachefactory-iid-page"><p>This error occurs when trying to create a new <code>cache</code> object via <a href="api/ng.$cacheFactory"><code>api/ng.$cacheFactory</code></a> with an ID that was already used to create another cache object.</p>
|
||||
<p>To resolve the error please use a different cache ID when calling <code>$cacheFactory</code>.</p>
|
||||
</div></div>
|
||||
</div>
|
36
lib/angular/docs/partials/error/$compile:ctreq.html
Executable file
36
lib/angular/docs/partials/error/$compile:ctreq.html
Executable file
|
@ -0,0 +1,36 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/compile/ctreq.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Missing Required Controller</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$compile</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Controller '{0}', required by directive '{1}', can't be found!">Controller '{0}', required by directive '{1}', can't be found!</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-compile-page -compile-ctreq-page"><p>This error occurs when <a href="api/ng.$compile"><code>template compiler</code></a> tries process the directive that specifies the <code>require</code> option in a <a href="guide/directive#directivedefinitionobject">directive definition</a>,
|
||||
but the required directive controller is not present on the current DOM element (or its ancestor element, if <code>^</code> was specified).</p>
|
||||
<p>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.</p>
|
||||
<p>If the required controller is expected to be on a ancestor element, make ensure that you prefix the controller name in the <code>require</code> definition with <code>^</code>.</p>
|
||||
<p>If the required controller is optionally requested, use <code>?</code> or <code>^?</code> to specify that.</p>
|
||||
<p>Example of a directive that requires <a href="api/ng.directive:ngModel"><code>ngModel</code></a> controller:</p>
|
||||
<pre><code>myApp.directive('myDirective', function() {
|
||||
return {
|
||||
require: 'ngModel',
|
||||
...
|
||||
}
|
||||
}</code></pre>
|
||||
<p>This directive can then be used as:</p>
|
||||
<pre><code><input ng-model="some.path" my-directive></code></pre>
|
||||
<p>Example of a directive that optionally requires a <a href="api/ng.directive:form"><code>form</code></a> controller from an ancestor:</p>
|
||||
<pre><code>myApp.directive('myDirective', function() {
|
||||
return {
|
||||
require: '^?form',
|
||||
...
|
||||
}
|
||||
}</code></pre>
|
||||
<p>This directive can then be used as:</p>
|
||||
<pre><code><form name="myForm">
|
||||
<div>
|
||||
<span my-directive></span>
|
||||
</div>
|
||||
</form></code></pre>
|
||||
</div></div>
|
||||
</div>
|
24
lib/angular/docs/partials/error/$compile:iscp.html
Executable file
24
lib/angular/docs/partials/error/$compile:iscp.html
Executable file
|
@ -0,0 +1,24 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/compile/iscp.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid Isolate Scope Definition</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$compile</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}">Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-compile-page -compile-iscp-page"><p>When declaring isolate scope the scope definition object must be in specific format which starts with mode character (<code>@&=</code>) with an optional local name.</p>
|
||||
<pre><code>myModule.directive('directiveName', function factory() {
|
||||
return {
|
||||
...
|
||||
scope: {
|
||||
'attrName': '@', // OK
|
||||
'attrName2': '=localName', // OK
|
||||
'attrName3': 'name', // ERROR: missing mode @&=
|
||||
'attrName4': ' = name', // ERROR: extra spaces
|
||||
'attrName5': 'name=', // ERROR: must be prefixed with @&=
|
||||
}
|
||||
...
|
||||
}
|
||||
});</code></pre>
|
||||
<p>Please refer to the <a href="guide/directive#directivedefinitionobject">directive definition docs</a> to learn more about the api.</p>
|
||||
</div></div>
|
||||
</div>
|
18
lib/angular/docs/partials/error/$compile:multidir.html
Executable file
18
lib/angular/docs/partials/error/$compile:multidir.html
Executable file
|
@ -0,0 +1,18 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/compile/multidir.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Multiple Directive Resource Contention</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$compile</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Multiple directives [{0}, {1}] asking for {2} on: {3}">Multiple directives [{0}, {1}] asking for {2} on: {3}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-compile-page -compile-multidir-page"><p>This error occurs when multiple directives are applied to the same DOM element, and processing them would result in an collisions or unsupported configuration.</p>
|
||||
<p>To resolve this issue remove one of the directives which is causing the collision.</p>
|
||||
<p>Example scenarios of multiple incompatible directives applied to the same element include:</p>
|
||||
<ul>
|
||||
<li>Multiple directives requesting <code>isolated scope</code>.</li>
|
||||
<li>Multiple directives publishing a controller under the same name.</li>
|
||||
<li>Multiple directives declared with the <code>transclusion</code> option.</li>
|
||||
<li>Multiple directives attempting to define a <code>template</code> or <code>templateURL</code>.</li>
|
||||
</ul>
|
||||
</div></div>
|
||||
</div>
|
16
lib/angular/docs/partials/error/$compile:nodomevents.html
Executable file
16
lib/angular/docs/partials/error/$compile:nodomevents.html
Executable file
|
@ -0,0 +1,16 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/compile/nodomevents.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Interpolated Event Attributes</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$compile</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.">Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-compile-page -compile-nodomevents-page"><p>This error occurs when one tries to create a binding for event handler attributes like <code>onclick</code>, <code>onload</code>, <code>onsubmit</code>, etc.</p>
|
||||
<p>There is no practical value in binding to these attributes and doing so only exposes your application to security vulnerabilities like XSS.
|
||||
For these reasons binding to event handler attributes (all attributes that start with <code>on</code> and <code>formaction</code> attribute) is not supported.</p>
|
||||
<p>An example code that would allow XSS vulnerability by evaluating user input in the window context could look like this:</p>
|
||||
<pre><code><input ng-mode="username">
|
||||
<div onclick="{{username}}">click me</div></code></pre>
|
||||
<p>Since the <code>onclick</code> evaluates the value as JavaScript code in the window context, setting the <code>username</code> model to a value like <code>javascript:alert('PWND')</code> would result in script injection when the <code>div</code> is clicked.</p>
|
||||
</div></div>
|
||||
</div>
|
27
lib/angular/docs/partials/error/$compile:nonassign.html
Executable file
27
lib/angular/docs/partials/error/$compile:nonassign.html
Executable file
|
@ -0,0 +1,27 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/compile/nonassign.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Non-Assignable Expression</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$compile</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Expression '{0}' used with directive '{1}' is non-assignable!">Expression '{0}' used with directive '{1}' is non-assignable!</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-compile-page -compile-nonassign-page"><p>This error occurs when a directive defines an isolate scope property that support two-way data-binding (using the <code>=</code> mode in the <a href="guide/directive#directivedefinitionobject">directive definition</a>) but the directive is used with an expression that is not-assignable.</p>
|
||||
<p>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.</p>
|
||||
<p>For example, given a directive:</p>
|
||||
<pre><code>myModule.directive('myDirective', function factory() {
|
||||
return {
|
||||
...
|
||||
scope: {
|
||||
'bind': '=localValue'
|
||||
}
|
||||
...
|
||||
}
|
||||
});</code></pre>
|
||||
<p>Following are invalid uses of this directive:</p>
|
||||
<pre><code><my-directive bind="1+2"> <!-- ERROR because `1+2=localValue` is an invalid statement -->
|
||||
<my-directive bind="myFn()"> <!-- ERROR because `myFn()=localValue` is an invalid statement --></code></pre>
|
||||
<p>To resolve this error, always use path expressions with scope properties that are two-way data-bound:</p>
|
||||
<pre><code><my-directive bind="some.property">
|
||||
<my-directive bind="some[3]['property']"></code></pre>
|
||||
</div></div>
|
||||
</div>
|
16
lib/angular/docs/partials/error/$compile:selmulti.html
Executable file
16
lib/angular/docs/partials/error/$compile:selmulti.html
Executable file
|
@ -0,0 +1,16 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/compile/selmulti.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Binding to Multiple Attribute</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$compile</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Binding to the 'multiple' attribute is not supported. Element: {0}">Binding to the 'multiple' attribute is not supported. Element: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-compile-page -compile-selmulti-page"><p>Binding to the <code>multiple</code> attribute of <code>select</code> element is not supported since switching between multiple and single mode changes the <a href="api/ng.directive:ngModel"><code><code>ngModel</code></code></a> object type from instance to array of instances which breaks the model semantics.</p>
|
||||
<p>If you need to use different types of <code>select</code> elements in your template based on some variable, please use <a href="api/ng.directive:ngIf"><code>ngIf</code></a> or <a href="api/ng.directive:ngSwitch"><code>ngSwitch</code></a> directives to select one of them to be used at runtime.</p>
|
||||
<p>Example with invalid usage:</p>
|
||||
<pre><code><select ng-model="some.model" multiple="{{mode}}"></select></code></pre>
|
||||
<p>Example that uses ngIf to pick one of the <code>select</code> elements based on a variable:</p>
|
||||
<pre><code><select ng-if="mode == 'multiple'" ng-model="some.model" multiple></select>
|
||||
<select ng-if="mode != 'multiple'" ng-model="some.model"></select></code></pre>
|
||||
</div></div>
|
||||
</div>
|
13
lib/angular/docs/partials/error/$compile:tpload.html
Executable file
13
lib/angular/docs/partials/error/$compile:tpload.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/compile/tpload.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Error Loading Template</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$compile</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Failed to load template: {0}">Failed to load template: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-compile-page -compile-tpload-page"><p>This error occurs when <a href="api/ng.$compile"><code><code>$compile</code></code></a> attempts to fetch a template from some URL, and the request fails.</p>
|
||||
<p>To resolve this error, ensure that the URL of the template is spelled correctly and resolves to correct absolute URL.
|
||||
The <a href="https://developers.google.com/chrome-developer-tools/docs/network#network_panel_overview">Chrome Developer Tools</a> might also be helpful in determining why the request failed.</p>
|
||||
<p>If you are using <a href="api/ng.$templateCache"><code>api/ng.$templateCache</code></a> to pre-load templates, ensure that the cache was populated with the template.</p>
|
||||
</div></div>
|
||||
</div>
|
24
lib/angular/docs/partials/error/$compile:tplrt.html
Executable file
24
lib/angular/docs/partials/error/$compile:tplrt.html
Executable file
|
@ -0,0 +1,24 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/compile/tplrt.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid Template Root</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$compile</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Template for directive '{0}' must have exactly one root element. {1}">Template for directive '{0}' must have exactly one root element. {1}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-compile-page -compile-tplrt-page"><p>When a directive is declared with <code>template</code> (or <code>templateUrl</code>) and <code>replace</code> mode on, the template must have exactly one root element.
|
||||
Otherwise the replacement operation would result in a single element being replaced with multiple elements or nodes, which is unsupported and not commonly needed in practice.</p>
|
||||
<p>For example a directive with definition:</p>
|
||||
<pre><code>myModule.directive('myDirective', function factory() {
|
||||
return {
|
||||
...
|
||||
replace: true,
|
||||
templateUrl: 'someUrl'
|
||||
...
|
||||
}
|
||||
});</code></pre>
|
||||
<p>And a template provided at URL <code>someUrl</code>. The template must be an html fragment that has only a single root element, like the <code>div</code> element in this template:</p>
|
||||
<pre><code><div><b>Hello</b> World!</div></code></pre>
|
||||
<p>An an invalid template to be used with this directive is one that defines multiple root nodes or elements. For example:</p>
|
||||
<pre><code><b>Hello</b> World!</code></pre>
|
||||
</div></div>
|
||||
</div>
|
25
lib/angular/docs/partials/error/$compile:uterdir.html
Executable file
25
lib/angular/docs/partials/error/$compile:uterdir.html
Executable file
|
@ -0,0 +1,25 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/compile/uterdir.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Unterminated Directive</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$compile</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Unterminated attribute, found '{0}' but no matching '{1}' found.">Unterminated attribute, found '{0}' but no matching '{1}' found.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-compile-page -compile-uterdir-page"><p>This error occurs when using multi-element directives and a <code>directive-start</code> attribute fails to form a matching pair with a corresponding <code>directive-end</code> attribute.
|
||||
A <code>directive-start</code> should have a matching <code>directive-end</code> on a sibling node in the DOM. For instance,</p>
|
||||
<pre><code><table>
|
||||
<tr ng-repeat-start="item in list">I get repeated</tr>
|
||||
<tr ng-repeat-end>I also get repeated</tr>
|
||||
</table></code></pre>
|
||||
<p>is a valid example.</p>
|
||||
<p>This error can occur in several different ways. One is by leaving out the <code>directive-end</code> attribute, like so:</p>
|
||||
<pre><code><div>
|
||||
<span foo-start></span>
|
||||
</div></code></pre>
|
||||
<p>Another is by nesting a <code>directive-end</code> inside of <code>directive-start</code>, or vice versa:</p>
|
||||
<pre><code><div>
|
||||
<span foo-start><span foo-end></span></span>
|
||||
</div></code></pre>
|
||||
<p>To avoid this error, make sure each <code>directive-start</code> you use has a matching <code>directive-end</code> on a sibling node in the DOM.</p>
|
||||
</div></div>
|
||||
</div>
|
17
lib/angular/docs/partials/error/$controller:noscp.html
Executable file
17
lib/angular/docs/partials/error/$controller:noscp.html
Executable file
|
@ -0,0 +1,17 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/controller/noscp.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Missing $scope object</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$controller</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.">Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-controller-page -controller-noscp-page"><p>This error occurs when <a href="api/ng.$controller"><code>$controller</code></a> service is called in order to instantiate a new controller but no scope is provided via <code>$scope</code> property of the locals map.</p>
|
||||
<p>Example of incorrect usage that leads to this error:</p>
|
||||
<pre><code>$controller(MyController);
|
||||
//or
|
||||
$controller(MyController, {scope: newScope});</code></pre>
|
||||
<p>To fix the example above please provide a scope to the $controller call:</p>
|
||||
<pre><code>$controller(MyController, {$scope, newScope});</code></pre>
|
||||
<p>Please consult the <a href="api/ng.$controller"><code>$controller</code></a> service api docs to learn more.</p>
|
||||
</div></div>
|
||||
</div>
|
13
lib/angular/docs/partials/error/$httpBackend:noxhr.html
Executable file
13
lib/angular/docs/partials/error/$httpBackend:noxhr.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/httpBackend/noxhr.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Unsupported XHR</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$httpBackend</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="This browser does not support XMLHttpRequest.">This browser does not support XMLHttpRequest.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-httpbackend-page -httpbackend-noxhr-page"><p>This error occurs in browsers that do not support XmlHttpRequest. AngularJS
|
||||
supports Safari, Chrome, Firefox, Opera, IE8 and higher, and mobile browsers
|
||||
(Android, Chrome Mobile, iOS Safari). To avoid this error, use an officially
|
||||
supported browser.</p>
|
||||
</div></div>
|
||||
</div>
|
24
lib/angular/docs/partials/error/$injector:cdep.html
Executable file
24
lib/angular/docs/partials/error/$injector:cdep.html
Executable file
|
@ -0,0 +1,24 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/injector/cdep.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Circular Dependency</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$injector</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Circular dependency found: {0}">Circular dependency found: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-injector-page -injector-cdep-page"><p>This error occurs when the <a href="api/angular.injector"><code>$injector</code></a> tries to get
|
||||
a service that depends on itself, either directly or indirectly. To fix this,
|
||||
construct your dependency chain such that there are no circular dependencies.</p>
|
||||
<p>For example:</p>
|
||||
<pre><code>angular.module('myApp', [])
|
||||
.factory('myService', function (myService) {
|
||||
// ...
|
||||
})
|
||||
.controller('MyCtrl', function ($scope, myService) {
|
||||
// ...
|
||||
});</code></pre>
|
||||
<p>When an instance of <code>MyCtrl</code> is created, the service <code>myService</code> will be created
|
||||
by the <code>$injector</code>. <code>myService</code> depends on itself, which causes the <code>$injector</code>
|
||||
to detect a circular dependency and throw the error.</p>
|
||||
<p>For more information, see the <a href="guide/di">Dependency Injection Guide</a>.</p>
|
||||
</div></div>
|
||||
</div>
|
24
lib/angular/docs/partials/error/$injector:itkn.html
Executable file
24
lib/angular/docs/partials/error/$injector:itkn.html
Executable file
|
@ -0,0 +1,24 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/injector/itkn.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Bad Injection Token</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$injector</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Incorrect injection token! Expected service name as string, got {0}">Incorrect injection token! Expected service name as string, got {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-injector-page -injector-itkn-page"><p>This error occurs when using a bad token as a dependency injection annotation.
|
||||
Dependency injection annotation tokens should always be strings. Using any other
|
||||
type will cause this error to be thrown.</p>
|
||||
<p>Examples of code with bad injection tokens include:</p>
|
||||
<pre><code>var myCtrl = function ($scope, $http) { /* ... */ };
|
||||
myCtrl.$inject = ['$scope', 42];
|
||||
|
||||
myAppModule.controller('MyCtrl', ['$scope', {}, function ($scope, $timeout) {
|
||||
// ...
|
||||
}]);</code></pre>
|
||||
<p>The bad injection tokens are <code>42</code> in the first example and <code>{}</code> in the second.
|
||||
To avoid the error, always use string literals for dependency injection annotation
|
||||
tokens.</p>
|
||||
<p>For an explanation of what injection annotations are and how to use them, refer
|
||||
to the <a href="guide/di">Dependency Injection Guide</a>.</p>
|
||||
</div></div>
|
||||
</div>
|
13
lib/angular/docs/partials/error/$injector:modulerr.html
Executable file
13
lib/angular/docs/partials/error/$injector:modulerr.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/injector/modulerr.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Module Error</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$injector</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Failed to instantiate module {0} due to:
|
||||
{1}">Failed to instantiate module {0} due to:
|
||||
{1}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-injector-page -injector-modulerr-page"><p>This error occurs when a module fails to load due to some exception. The error
|
||||
message above should provide additional context.</p>
|
||||
</div></div>
|
||||
</div>
|
21
lib/angular/docs/partials/error/$injector:nomod.html
Executable file
21
lib/angular/docs/partials/error/$injector:nomod.html
Executable file
|
@ -0,0 +1,21 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/injector/nomod.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Module Unavailable</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$injector</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.">Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-injector-page -injector-nomod-page"><p>This error occurs when trying to "re-open" a module that has not yet been defined.</p>
|
||||
<p>To define a new module, call <a href="api/angular.module"><code>angular.module</code></a> with a name
|
||||
and an array of dependent modules, like so:</p>
|
||||
<pre><code>// When defining a module with no module dependencies,
|
||||
// the requires array should be defined and empty.
|
||||
var myApp = angular.module('myApp', []);</code></pre>
|
||||
<p>To retrieve a reference to the same module for further configuration, call
|
||||
<code>angular.module</code> without the <code>requires</code> array.</p>
|
||||
<pre><code>var myApp = angular.module('myApp');</code></pre>
|
||||
<p>Calling <code>angular.module</code> without the <code>requires</code> array when the module has not yet
|
||||
been defined causes this error to be thrown. To fix it, define your module with
|
||||
a name and an empty array, as in the first example above.</p>
|
||||
</div></div>
|
||||
</div>
|
21
lib/angular/docs/partials/error/$injector:pget.html
Executable file
21
lib/angular/docs/partials/error/$injector:pget.html
Executable file
|
@ -0,0 +1,21 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/injector/pget.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Provider Missing $get</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$injector</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Provider '{0}' must define $get factory method.">Provider '{0}' must define $get factory method.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-injector-page -injector-pget-page"><p>This error occurs when attempting to register a provider that does not have a
|
||||
<code>$get</code> method. For example:</p>
|
||||
<pre><code>function BadProvider() {} // No $get method!
|
||||
angular.module("myApp", [])
|
||||
.provider('bad', BadProvider); // this throws the error</code></pre>
|
||||
<p>To fix the error, fill in the <code>$get</code> method on the provider like so:</p>
|
||||
<pre><code>function GoodProvider() {
|
||||
this.$get = angular.noop;
|
||||
}
|
||||
angular.module("myApp", [])
|
||||
.provider('good', GoodProvider);</code></pre>
|
||||
<p>For more information, refer to the <a href="api/AUTO.$provide#provider"><code>$provide.provider</code></a> api doc.</p>
|
||||
</div></div>
|
||||
</div>
|
23
lib/angular/docs/partials/error/$injector:unpr.html
Executable file
23
lib/angular/docs/partials/error/$injector:unpr.html
Executable file
|
@ -0,0 +1,23 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/injector/unpr.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Unknown Provider</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$injector</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Unknown provider: {0}">Unknown provider: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-injector-page -injector-unpr-page"><p>This error results from the <code>$injector</code> being unable to resolve a required
|
||||
dependency. To fix this, make sure the dependency is defined and spelled
|
||||
correctly. For example:</p>
|
||||
<pre><code>angular.module('myApp', [])
|
||||
.controller('myCtrl', ['myService', function (myService) {
|
||||
// Do something with myService
|
||||
}]);</code></pre>
|
||||
<p>This code will fail with <code>$injector:unpr</code> if <code>myService</code> is not defined. Making
|
||||
sure each dependency is defined will fix the problem.</p>
|
||||
<pre><code>angular.module('myApp', [])
|
||||
.service('myService', function () { /* ... */ })
|
||||
.controller('myCtrl', ['myService', function (myService) {
|
||||
// Do something with myService
|
||||
}]);</code></pre>
|
||||
</div></div>
|
||||
</div>
|
13
lib/angular/docs/partials/error/$interpolate:interr.html
Executable file
13
lib/angular/docs/partials/error/$interpolate:interr.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/interpolate/interr.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Interpolation Error</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$interpolate</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Can't interpolate: {0}
|
||||
{1}">Can't interpolate: {0}
|
||||
{1}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-interpolate-page -interpolate-interr-page"><p>This error occurs when interpolation fails due to some exception. The error
|
||||
message above should provide additional context.</p>
|
||||
</div></div>
|
||||
</div>
|
17
lib/angular/docs/partials/error/$interpolate:noconcat.html
Executable file
17
lib/angular/docs/partials/error/$interpolate:noconcat.html
Executable file
|
@ -0,0 +1,17 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/interpolate/noconcat.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Multiple Expressions</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$interpolate</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Error while interpolating: {0}
|
||||
Strict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce">Error while interpolating: {0}
|
||||
Strict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-interpolate-page -interpolate-noconcat-page"><p>This error occurs when performing an interpolation that concatenates multiple
|
||||
expressions when a trusted value is required. Concatenating expressions makes
|
||||
it hard to reason about whether some combination of concatenated values are
|
||||
unsafe to use and could easily lead to XSS.</p>
|
||||
<p>For more information about how AngularJS helps keep your app secure, refer to
|
||||
the <a href="api/ng.$sce"><code>$sce</code></a> API doc.</p>
|
||||
</div></div>
|
||||
</div>
|
16
lib/angular/docs/partials/error/$location:ihshprfx.html
Executable file
16
lib/angular/docs/partials/error/$location:ihshprfx.html
Executable file
|
@ -0,0 +1,16 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/location/ihshprfx.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Missing Hash Prefix</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$location</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Invalid url "{0}", missing hash prefix "{1}".">Invalid url "{0}", missing hash prefix "{1}".</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-location-page -location-ihshprfx-page"><p>This error occurs when <a href="api/ng.$location"><code>$location</code></a> service is configured to use a hash prefix but this prefix was not present in a url that the <code>$location</code> service was asked to parse.</p>
|
||||
<p>For example if you configure <code>$location</code> service with prefix <code>'!'</code>:</p>
|
||||
<pre><code>myApp.config(function($locationProvider) {
|
||||
$locationProvider.prefix('!');
|
||||
});</code></pre>
|
||||
<p>If you enter the app at url <code>http:/myapp.com/#/myView</code> this error will be throw.</p>
|
||||
<p>The correct url for this configuration is <code>http:/myapp.com/#!/myView</code> (note the <code>'!'</code> after <code>'#'</code> symbol).</p>
|
||||
</div></div>
|
||||
</div>
|
11
lib/angular/docs/partials/error/$location:ipthprfx.html
Executable file
11
lib/angular/docs/partials/error/$location:ipthprfx.html
Executable file
|
@ -0,0 +1,11 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/location/ipthprfx.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid or Missing Path Prefix</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$location</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Invalid url "{0}", missing path prefix "{1}".">Invalid url "{0}", missing path prefix "{1}".</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-location-page -location-ipthprfx-page"><p>This error occurs when you configure the <a href="api/ng.$location"><code><code>$location</code></code></a> service in the html5 mode, specify a base url for your application via <code><base></code> element and try to update the location with a path that doesn't match the base prefix.</p>
|
||||
<p>To resolve this issue, please check the base url specified via the <code><base></code> tag in the head of your main html document, as well as the url that you tried to set the location to.</p>
|
||||
</div></div>
|
||||
</div>
|
12
lib/angular/docs/partials/error/$location:isrcharg.html
Executable file
12
lib/angular/docs/partials/error/$location:isrcharg.html
Executable file
|
@ -0,0 +1,12 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/location/isrcharg.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Wrong $location.search() argument type</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$location</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="The first argument of the `$location#search()` call must be a string or an object.">The first argument of the `$location#search()` call must be a string or an object.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-location-page -location-isrcharg-page"><p>To resolve this error, ensure that the first argument for the <code>$location.search</code> call is a <code>string</code> or an object.
|
||||
You can use the stack trace associated with this error to identify the call site that caused this issue.</p>
|
||||
<p>To learn more, please consult the <a href="api/ng.$location"><code><code>$location</code></code></a> api docs.</p>
|
||||
</div></div>
|
||||
</div>
|
16
lib/angular/docs/partials/error/$parse:isecfld.html
Executable file
16
lib/angular/docs/partials/error/$parse:isecfld.html
Executable file
|
@ -0,0 +1,16 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/parse/isecfld.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Referencing 'constructor' Field in Expression</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$parse</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Referencing "constructor" field in Angular expressions is disallowed! Expression: {0}">Referencing "constructor" field in Angular expressions is disallowed! Expression: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-parse-page -parse-isecfld-page"><p>Occurs when an expression attempts to access an objects constructor field.</p>
|
||||
<p>AngularJS bans constructor access from within expressions since constructor
|
||||
access is a known way to execute arbitrary Javascript code.</p>
|
||||
<p>To resolve this error, avoid constructor access. As a last resort, alias
|
||||
the constructor and access it through the alias instead.</p>
|
||||
<p>Example expression that would result in this error:</p>
|
||||
<pre><code><div>{{user.constructor.name}}</div></code></pre>
|
||||
</div></div>
|
||||
</div>
|
12
lib/angular/docs/partials/error/$parse:isecfn.html
Executable file
12
lib/angular/docs/partials/error/$parse:isecfn.html
Executable file
|
@ -0,0 +1,12 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/parse/isecfn.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Referencing Function Disallowed</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$parse</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Referencing Function in Angular expressions is disallowed! Expression: {0}">Referencing Function in Angular expressions is disallowed! Expression: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-parse-page -parse-isecfn-page"><p>Occurs when an expression attempts to access the 'Function' object (constructor for all functions in JavaScript).</p>
|
||||
<p>Angular bans access to Function from within expressions since constructor access is a known way to execute arbitrary Javascript code.</p>
|
||||
<p>To resolve this error, avoid Function access.</p>
|
||||
</div></div>
|
||||
</div>
|
12
lib/angular/docs/partials/error/$parse:lexerr.html
Executable file
12
lib/angular/docs/partials/error/$parse:lexerr.html
Executable file
|
@ -0,0 +1,12 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/parse/lexerr.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Lexer Error</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$parse</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Lexer Error: {0} at column{1} in expression [{2}].">Lexer Error: {0} at column{1} in expression [{2}].</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-parse-page -parse-lexerr-page"><p>Occurs when an expression has a lexical error, for example a malformed number (0.5e-) or an invalid unicode escape.</p>
|
||||
<p>The error message contains a more precise error.</p>
|
||||
<p>To resolve, learn more about <a href="guide/expression">Angular expressions</a>, identify the error and fix the expression's syntax.</p>
|
||||
</div></div>
|
||||
</div>
|
12
lib/angular/docs/partials/error/$parse:syntax.html
Executable file
12
lib/angular/docs/partials/error/$parse:syntax.html
Executable file
|
@ -0,0 +1,12 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/parse/syntax.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Syntax Error</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$parse</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].">Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-parse-page -parse-syntax-page"><p>Occurs when there is a syntax error in an expression. These errors are thrown while compiling the expression.
|
||||
The error message contains a more precise description of the error, including the location (column) in the expression where the error occurred.</p>
|
||||
<p>To resolve, learn more about <a href="guide/expression">Angular expressions</a>, identify the error and fix the expression's syntax.</p>
|
||||
</div></div>
|
||||
</div>
|
12
lib/angular/docs/partials/error/$parse:ueoe.html
Executable file
12
lib/angular/docs/partials/error/$parse:ueoe.html
Executable file
|
@ -0,0 +1,12 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/parse/ueoe.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Unexpected End of Expression</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$parse</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Unexpected end of expression: {0}">Unexpected end of expression: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-parse-page -parse-ueoe-page"><p>Occurs when an expression is missing tokens at the end of the expression.
|
||||
For example, forgetting a closing bracket in an expression will trigger this error.</p>
|
||||
<p>To resolve, learn more about <a href="guide/expression">Angular expressions</a>, identify the error and fix the expression's syntax.</p>
|
||||
</div></div>
|
||||
</div>
|
12
lib/angular/docs/partials/error/$resource:badargs.html
Executable file
12
lib/angular/docs/partials/error/$resource:badargs.html
Executable file
|
@ -0,0 +1,12 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/resource/badargs.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Too Many Arguments</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$resource</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Expected up to 4 arguments [params, data, success, error], got {0} arguments">Expected up to 4 arguments [params, data, success, error], got {0} arguments</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-resource-page -resource-badargs-page"><p>This error occurs when specifying too many arguments to a <a href="api/ngResource.$resource"><code>$resource</code></a> action, such as <code>get</code>, <code>query</code> or any user-defined custom action.
|
||||
These actions may take up to 4 arguments.</p>
|
||||
<p>For more information, refer to the <a href="api/ngResource.$resource"><code>$resource</code></a> API reference documentation.</p>
|
||||
</div></div>
|
||||
</div>
|
13
lib/angular/docs/partials/error/$resource:badcfg.html
Executable file
13
lib/angular/docs/partials/error/$resource:badcfg.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/resource/badcfg.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Response does not match configured parameter</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$resource</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Error in resource configuration. Expected response to contain an {0} but got an {1}">Error in resource configuration. Expected response to contain an {0} but got an {1}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-resource-page -resource-badcfg-page"><p>This error occurs when the <a href="api/ngResource.$resource"><code>$resource</code></a> service expects a response that can be deserialized as an array, receives an object, or vice versa.
|
||||
By default, all resource actions expect objects, except <code>query</code> which expects arrays.</p>
|
||||
<p>To resolve this error, make sure your <code>$resource</code> configuration matches the actual format of the data returned from the server.</p>
|
||||
<p>For more information, see the <a href="api/ngResource.$resource"><code>$resource</code></a> API reference documentation.</p>
|
||||
</div></div>
|
||||
</div>
|
16
lib/angular/docs/partials/error/$rootScope:infdig.html
Executable file
16
lib/angular/docs/partials/error/$rootScope:infdig.html
Executable file
|
@ -0,0 +1,16 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/rootScope/infdig.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Infinite $digest Loop</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$rootScope</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="{0} $digest() iterations reached. Aborting!
|
||||
Watchers fired in the last 5 iterations: {1}">{0} $digest() iterations reached. Aborting!
|
||||
Watchers fired in the last 5 iterations: {1}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-rootscope-page -rootscope-infdig-page"><p>This error occurs when the application's model becomes unstable and each <code>$digest</code> cycle triggers a state change and subsequent <code>$digest</code> cycle. Angular detects this situation and prevents an infinite loop from causing the browser to become unresponsive.</p>
|
||||
<p>For example, the situation can occur by setting up a watch on a path and subsequently updating the same path when the value changes.</p>
|
||||
<pre><code>$scope.$watch('foo', function() {
|
||||
$scope.foo = $scope.foo + 1;
|
||||
});</code></pre>
|
||||
</div></div>
|
||||
</div>
|
57
lib/angular/docs/partials/error/$rootScope:inprog.html
Executable file
57
lib/angular/docs/partials/error/$rootScope:inprog.html
Executable file
|
@ -0,0 +1,57 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/rootScope/inprog.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Action Already In Progress</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$rootScope</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="{0} already in progress">{0} already in progress</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-rootscope-page -rootscope-inprog-page"><p>At any point in time there can be only one <code>$digest</code> or $apply operation in progress.
|
||||
The stack trace of this error allows you to trace the origin of the currently executing $apply or $digest call.</p>
|
||||
<p><code>$digest</code> or <code>$apply</code> are processing operational states of the Scope - data-structure in Angular that provides context for models and enables model mutation observation.</p>
|
||||
<p>Trying to reenter a <code>$digest</code> or <code>$apply</code> while one of them is already in progress is typically a sign of programming error that needs to be fixed.</p>
|
||||
<p>This error is often seen when interacting with an API that is sometimes sync and sometimes async.</p>
|
||||
<p>For example:</p>
|
||||
<pre><code>function MyController() {
|
||||
thirdPartyComponent.getData(function(someData) {
|
||||
scope.$apply(function() {
|
||||
scope.someData = someData;
|
||||
});
|
||||
});
|
||||
}</code></pre>
|
||||
<p>The controller constructor is always instantiated from within an $apply cycle, so if the third-party component called our callback synchronously, we'd be trying to enter the $apply again.</p>
|
||||
<p>To resolve this type of issue, either fix the api to be always synchronous or asynchronous or wrap the call to the api with setTimeout call to make it always asynchronous.</p>
|
||||
<p>Other situation that leads to this error is when you are trying to reuse a function to by using it as a callback for code that is called by various apis inside and outside of $apply.</p>
|
||||
<p>For example:</p>
|
||||
<pre><code>myApp.directive('myDirective', function() {
|
||||
return {
|
||||
link: function($scope, $element) {
|
||||
function doSomeWork() {
|
||||
$scope.$apply(function() {
|
||||
// do work here, and update the model
|
||||
};
|
||||
}
|
||||
|
||||
$element.on('click', doSomeWork);
|
||||
doSomeWork(); // << this will throw an exception because templates are compiled within $apply
|
||||
}
|
||||
}
|
||||
});</code></pre>
|
||||
<p>The fix for the example above looks like this:</p>
|
||||
<pre><code>myApp.directive('myDirective', function() {
|
||||
return {
|
||||
link: function($scope, $element) {
|
||||
function doSomeWork() {
|
||||
// do work here, and update the model
|
||||
}
|
||||
|
||||
$element.on('click', function() {
|
||||
$scope.$apply(doSomeWork); // <<< the $apply call was moved to the callsite that doesn't execute in $apply call already
|
||||
});
|
||||
|
||||
doSomeWork();
|
||||
}
|
||||
}
|
||||
});</code></pre>
|
||||
<p>To learn more about Angular processing model please check out the <a href="guide/concepts">concepts doc</a> as well as the <a href="api/ng.$rootScope.Scope"><code>api</code></a> doc.</p>
|
||||
</div></div>
|
||||
</div>
|
13
lib/angular/docs/partials/error/$sanitize:badparse.html
Executable file
13
lib/angular/docs/partials/error/$sanitize:badparse.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/sanitize/badparse.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Parsing Error while Sanitizing</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$sanitize</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="The sanitizer was unable to parse the following block of html: {0}">The sanitizer was unable to parse the following block of html: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-sanitize-page -sanitize-badparse-page"><p>This error occurs when the HTML string passed to '$sanitize' can't be parsed by the sanitizer.
|
||||
The error contains part of the html string that can't be parsed.</p>
|
||||
<p>The parser is more strict than a typical browser parser, so it's possible that some obscure input would produce this error despite the string being recognized as valid HTML by a browser.</p>
|
||||
<p>If a valid html code results in this error, please file a bug.</p>
|
||||
</div></div>
|
||||
</div>
|
11
lib/angular/docs/partials/error/$sce:icontext.html
Executable file
11
lib/angular/docs/partials/error/$sce:icontext.html
Executable file
|
@ -0,0 +1,11 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/sce/icontext.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid / Unknown SCE context</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$sce</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Attempted to trust a value in invalid context. Context: {0}; Value: {1}">Attempted to trust a value in invalid context. Context: {0}; Value: {1}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-sce-page -sce-icontext-page"><p>The context enum passed to <a href="api/ng.$sce#trustAs"><code>$sce.trustAs</code></a> was not recognized.</p>
|
||||
<p>Please consult the list of <a href="api/ng.$sce#contexts"><code>supported Strict Contextual Escaping (SCE) contexts</code></a>.</p>
|
||||
</div></div>
|
||||
</div>
|
14
lib/angular/docs/partials/error/$sce:iequirks.html
Executable file
14
lib/angular/docs/partials/error/$sce:iequirks.html
Executable file
|
@ -0,0 +1,14 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/sce/iequirks.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">IE8 in quirks mode is unsupported</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$sce</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.">Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-sce-page -sce-iequirks-page"><p>This error occurs when you are using AngularJS with <a href="api/ng.$sce#strictcontextualescaping"><code>Strict Contextual Escaping (SCE)</code></a> mode enabled (the default) on IE8 or lower in quirks mode.</p>
|
||||
<p>In this mode, IE8 allows one to execute arbitrary javascript by the use of the <code>expression()</code> syntax and is not supported.
|
||||
Refer <a href="http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx">MSDN Blogs > IEBlog > Ending Expressions</a> to learn more about them.</p>
|
||||
<p>To resolve this error please specify the proper doctype at the top of your main html document:</p>
|
||||
<pre><code><!doctype html></code></pre>
|
||||
</div></div>
|
||||
</div>
|
19
lib/angular/docs/partials/error/$sce:insecurl.html
Executable file
19
lib/angular/docs/partials/error/$sce:insecurl.html
Executable file
|
@ -0,0 +1,19 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/insecurl.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Processing of a Resource from Untrusted Source Blocked</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$sce</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}">Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-sce-page -sce-insecurl-page"><p>AngularJS' <a href="api/ng.$sce#strictcontextualescaping"><code>Strict Contextual Escaping (SCE)</code></a> mode (enabled by default) has blocked loading a resource from an insecure URL.</p>
|
||||
<p>Typically, this would occur if you're attempting to load an Angular template from an untrusted source.
|
||||
It's also possible that a custom directive threw this error for a similar reason.</p>
|
||||
<p>Angular only loads templates from trusted URLs (by calling <a href="api/ng.$sce#getTrustedResourceUrl"><code>$sce.getTrustedResourceUrl</code></a> on the template URL).</p>
|
||||
<p>By default, only URLs that belong to the same origin are trusted. These are urls with the same domain and protocol as the application document.</p>
|
||||
<p>The <a href="api/ng.directive:ngInclude"><code>ngInclude</code></a> directive and <a href="guide/directive">directives</a> that specify a <code>templateUrl</code> require a trusted resource URL.</p>
|
||||
<p>To load templates from other domains and/or protocols, either adjust the <a href="api/ng.$sceDelegateProvider#resourceUrlWhitelist"><code>whitelist</code></a>/ <a href="api/ng.$sceDelegateProvider#resourceUrlBlacklist"><code>blacklist</code></a> or wrap the URL with a call to <a href="api/ng.$sce#trustAsResourceUrl"><code>$sce.trustAsResourceUrl</code></a>.</p>
|
||||
<p><strong>Note</strong>: The browser's <a href="https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest">Same Origin Policy</a> and <a href="http://www.w3.org/TR/cors/">Cross-Origin Resource Sharing (CORS)</a> policy apply
|
||||
that may further restrict whether the template is successfully loaded. (e.g. neither cross-domain
|
||||
requests won't work on all browsers nor <code>file://</code> requests on some browsers)</p>
|
||||
</div></div>
|
||||
</div>
|
11
lib/angular/docs/partials/error/$sce:itype.html
Executable file
11
lib/angular/docs/partials/error/$sce:itype.html
Executable file
|
@ -0,0 +1,11 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/sce/itype.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">String Value is Required for SCE Trust Call</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$sce</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Attempted to trust a non-string value in a content requiring a string: Context: {0}">Attempted to trust a non-string value in a content requiring a string: Context: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-sce-page -sce-itype-page"><p><a href="api/ng.$sce#trustAs"><code>$sce.trustAs</code></a> requires a string value.</p>
|
||||
<p>Read more about <a href="api/ng.$sce#strictcontextualescaping"><code>Strict Contextual Escaping (SCE)</code></a> in AngularJS.</p>
|
||||
</div></div>
|
||||
</div>
|
15
lib/angular/docs/partials/error/$sce:unsafe.html
Executable file
15
lib/angular/docs/partials/error/$sce:unsafe.html
Executable file
|
@ -0,0 +1,15 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/sce/unsafe.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Require a safe/trusted value</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$sce</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Attempting to use an unsafe value in a safe context.">Attempting to use an unsafe value in a safe context.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-sce-page -sce-unsafe-page"><p>The value provided for use in a specific context was not found to be safe/trusted for use.</p>
|
||||
<p>Angular's <a href="api/ng.$sce#strictcontextualescaping"><code>Strict Contextual Escaping (SCE)</code></a> mode
|
||||
(enabled by default), requires bindings in certain
|
||||
contexts to result in a value that is trusted as safe for use in such a context. (e.g. loading an
|
||||
Angular template from a URL requires that the URL is one considered safe for loading resources.)</p>
|
||||
<p>This helps prevent XSS and other security issues. Read more at <a href="api/ng.$sce#strictcontextualescaping"><code>Strict Contextual Escaping (SCE)</code></a></p>
|
||||
</div></div>
|
||||
</div>
|
14
lib/angular/docs/partials/error/index.html
Executable file
14
lib/angular/docs/partials/error/index.html
Executable file
|
@ -0,0 +1,14 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/index.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable=""></code>
|
||||
<div><span class="hint"></span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><div class="error-reference-page"><p>Use the Error Reference manual to find information about error conditions in
|
||||
your AngularJS app. Errors thrown in production builds of AngularJS will log
|
||||
links to this site on the console.</p>
|
||||
<p>Other useful references for debugging your app include:</p>
|
||||
<ul>
|
||||
<li><a href="api/index">API Reference</a> for detailed information about specific features</li>
|
||||
<li><a href="guide/index">Developer Guide</a> for AngularJS concepts</li>
|
||||
<li><a href="tutorial/index">Tutorial</a> for getting started</li>
|
||||
</ul>
|
||||
</div></div>
|
13
lib/angular/docs/partials/error/jqLite:nosel.html
Executable file
13
lib/angular/docs/partials/error/jqLite:nosel.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/jqLite/nosel.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Unsupported Selector Lookup</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">jqLite</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element">Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="jqlite-page jqlite-nosel-page"><p>In order to keep Angular small, Angular implements only a subset of the selectors in <a href="api/angular.element#angularsjqlite"><code>jqLite</code></a>.
|
||||
This error occurs when a jqLite instance is invoked with a selector other than this subset.</p>
|
||||
<p>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.</p>
|
||||
<p>Alternatively, you can include a full version of jQuery, which Angular will automatically use and that will make all selectors available.</p>
|
||||
</div></div>
|
||||
</div>
|
11
lib/angular/docs/partials/error/jqLite:offargs.html
Executable file
11
lib/angular/docs/partials/error/jqLite:offargs.html
Executable file
|
@ -0,0 +1,11 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/jqLite/offargs.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid jqLite#off() parameter</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">jqLite</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="jqLite#off() does not support the `selector` argument">jqLite#off() does not support the `selector` argument</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="jqlite-page jqlite-offargs-page"><p>This error occurs when trying to pass too many arguments to <code>jqLite#off</code>. Note
|
||||
that <code>jqLite#off</code> does not support namespaces or selectors like jQuery.</p>
|
||||
</div></div>
|
||||
</div>
|
12
lib/angular/docs/partials/error/jqLite:onargs.html
Executable file
12
lib/angular/docs/partials/error/jqLite:onargs.html
Executable file
|
@ -0,0 +1,12 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/jqLite/onargs.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid jqLite#on() Parameters</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">jqLite</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="jqLite#on() does not support the `selector` or `eventData` parameters">jqLite#on() does not support the `selector` or `eventData` parameters</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="jqlite-page jqlite-onargs-page"><p>This error occurs when trying to pass too many arguments to <code>jqLite#on</code>. Note
|
||||
that <code>jqLite#on</code> does not support the <code>selector</code> or <code>eventData</code> parameters as
|
||||
jQuery does.</p>
|
||||
</div></div>
|
||||
</div>
|
12
lib/angular/docs/partials/error/ng:areq.html
Executable file
12
lib/angular/docs/partials/error/ng:areq.html
Executable file
|
@ -0,0 +1,12 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ng/areq.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Bad Argument</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Argument '{0}' is {1}">Argument '{0}' is {1}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ng-page ng-areq-page"><p>AngularJS often asserts that certain values will be present and truthy using a
|
||||
helper function. If the assertion fails, this error is thrown. To fix this problem,
|
||||
make sure that the value the assertion expects is defined and truthy.</p>
|
||||
</div></div>
|
||||
</div>
|
26
lib/angular/docs/partials/error/ng:btstrpd.html
Executable file
26
lib/angular/docs/partials/error/ng:btstrpd.html
Executable file
|
@ -0,0 +1,26 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ng/btstrpd.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">App Already Bootstrapped with this Element</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="App Already Bootstrapped with this Element '{0}'">App Already Bootstrapped with this Element '{0}'</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ng-page ng-btstrpd-page"><p>Occurs when calling angular.bootstrap on an element that has already been bootstrapped.</p>
|
||||
<p>This usually happens when you accidentally use both <code>ng-app</code> and <code>angular.bootstrap</code> to bootstrap an application.</p>
|
||||
<pre><code><html>
|
||||
...
|
||||
<body ng-app="myApp">
|
||||
<script>
|
||||
angular.bootstrap(document.body, ['myApp']);
|
||||
</script>
|
||||
</body>
|
||||
</html></code></pre>
|
||||
<p>Note that for bootrapping purposes, the <code><html></code> element is the same as <code>document</code>, so the following will also throw an error.</p>
|
||||
<pre><code><html>
|
||||
...
|
||||
<script>
|
||||
angular.bootstrap(document, ['myApp']);
|
||||
</script>
|
||||
</html></code></pre>
|
||||
</div></div>
|
||||
</div>
|
13
lib/angular/docs/partials/error/ng:cpi.html
Executable file
13
lib/angular/docs/partials/error/ng:cpi.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ng/cpi.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Bad Copy</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Can't copy! Source and destination are identical.">Can't copy! Source and destination are identical.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ng-page ng-cpi-page"><p>This error occurs when attempting to copy an object to itself. Calling <a href="api/angular.copy"><code>angular.copy</code></a> with a <code>destination</code> object deletes
|
||||
all of the elements or properties on <code>destination</code> before copying to it. Copying
|
||||
an object to itself is not supported. Make sure to check your calls to
|
||||
<code>angular.copy</code> and avoid copying objects or arrays to themselves.</p>
|
||||
</div></div>
|
||||
</div>
|
14
lib/angular/docs/partials/error/ng:cpws.html
Executable file
14
lib/angular/docs/partials/error/ng:cpws.html
Executable file
|
@ -0,0 +1,14 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ng/cpws.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Copying Window or Scope</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Can't copy! Making copies of Window or Scope instances is not supported.">Can't copy! Making copies of Window or Scope instances is not supported.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ng-page ng-cpws-page"><p>Copying Window or Scope instances is not supported because of cyclical and self
|
||||
references. Avoid copying windows and scopes, as well as any other cyclical or
|
||||
self-referential structures. Note that trying to deep copy an object containing
|
||||
cyclical references that is neither a window nor a scope will cause infinite
|
||||
recursion and a stack overflow.</p>
|
||||
</div></div>
|
||||
</div>
|
21
lib/angular/docs/partials/error/ngModel:nonassign.html
Executable file
21
lib/angular/docs/partials/error/ngModel:nonassign.html
Executable file
|
@ -0,0 +1,21 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ngModel/nonassign.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Non-Assignable Expression</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">ngModel</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Expression '{0}' is non-assignable. Element: {1}">Expression '{0}' is non-assignable. Element: {1}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngmodel-page ngmodel-nonassign-page"><p>This error occurs when expression the <a href="api/ng.directive:ngModel"><code>ngModel</code></a> directive is bound to is a non-assignable expression.</p>
|
||||
<p>Examples using assignable expressions include:</p>
|
||||
<pre><code><input ng-model="namedVariable">
|
||||
<input ng-model="myObj.someProperty">
|
||||
<input ng-model="indexedArray[0]"></code></pre>
|
||||
<p>Examples of non-assignable expressions include:</p>
|
||||
<pre><code><input ng-model="foo + bar">
|
||||
<input ng-model="42">
|
||||
<input ng-model="'oops'">
|
||||
<input ng-model="myFunc()"></code></pre>
|
||||
<p>Always make sure that the expression bound via <code>ngModel</code> directive can be assigned to.</p>
|
||||
<p>For more information, see the <a href="api/ng.directive:ngModel"><code>ngModel API doc</code></a>.</p>
|
||||
</div></div>
|
||||
</div>
|
13
lib/angular/docs/partials/error/ngOptions:iexp.html
Executable file
13
lib/angular/docs/partials/error/ngOptions:iexp.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ngOptions/iexp.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid Expression</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">ngOptions</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}">Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngoptions-page ngoptions-iexp-page"><p>This error occurs when 'ngOptions' is passed an expression that isn't in an expected form.</p>
|
||||
<p>Here's an example of correct syntax:</p>
|
||||
<pre><code><select ng-model="color" ng-options="c.name for c in colors"></code></pre>
|
||||
<p>For more information on valid expression syntax, see 'ngOptions' in <a href="api/ng.directive:select"><code>select</code></a> directive docs.</p>
|
||||
</div></div>
|
||||
</div>
|
11
lib/angular/docs/partials/error/ngPattern:noregexp.html
Executable file
11
lib/angular/docs/partials/error/ngPattern:noregexp.html
Executable file
|
@ -0,0 +1,11 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ngPattern/noregexp.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Expected Regular Expression</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">ngPattern</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Expected {0} to be a RegExp but was {1}. Element: {2}">Expected {0} to be a RegExp but was {1}. Element: {2}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngpattern-page ngpattern-noregexp-page"><p>This error occurs when 'ngPattern' is passed an expression that isn't a regular expression or doesn't have the expected format.</p>
|
||||
<p>For more information on valid expression syntax, see 'ngPattern' in <a href="api/ng.directive:select"><code>input</code></a> directive docs.</p>
|
||||
</div></div>
|
||||
</div>
|
17
lib/angular/docs/partials/error/ngRepeat:dupes.html
Executable file
17
lib/angular/docs/partials/error/ngRepeat:dupes.html
Executable file
|
@ -0,0 +1,17 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ngRepeat/dupes.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Duplicate Key in Repeater</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">ngRepeat</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}">Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngrepeat-page ngrepeat-dupes-page"><p>Occurs if there are duplicate keys in an <a href="api/ng.directive:ngRepeat"><code>ngRepeat</code></a> expression. Duplicate keys are banned because AngularJS uses keys to associate DOM nodes with items.</p>
|
||||
<p>By default, collections are keyed by reference which is desirable for most common models but can be problematic for primitive types that are interned (share references).</p>
|
||||
<p>For example the issue can be triggered by this <em>invalid</em> code:</p>
|
||||
<pre><code><div ng-repeat="value in [4, 4]">
|
||||
</div></code></pre>
|
||||
<p>To resolve this error either ensure that the items in the collection have unique identity of use the <code>track by</code> syntax to specify how to track the association between models and DOM.</p>
|
||||
<p>To resolve the example above can be resolved by using <code>track by $index</code>, which will cause the items to be keyed by their position in the array instead of their value:</p>
|
||||
<pre><code><div ng-repeat="value in [4, 4] track by $index"></div></code></pre>
|
||||
</div></div>
|
||||
</div>
|
13
lib/angular/docs/partials/error/ngRepeat:iexp.html
Executable file
13
lib/angular/docs/partials/error/ngRepeat:iexp.html
Executable file
|
@ -0,0 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ngRepeat/iexp.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid Expression</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">ngRepeat</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.">Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngrepeat-page ngrepeat-iexp-page"><p>Occurs when there is a syntax error in an <a href="api/ng.directive:ngRepeat"><code>ngRepeat</code></a>'s expression. The expression should be in the form '<em>item</em> in <em>collection</em>[ track by <em>id</em>]'.</p>
|
||||
<p>Be aware, the ngRepeat directive parses the expression using a regex before sending <em>collection</em> and optionally <em>id</em> to the AngularJS parser. This error comes from the regex parsing.</p>
|
||||
<p>To resolve, identify and fix errors in the expression, paying special attention to the 'in' and 'track by' keywords in the expression.</p>
|
||||
<p>Please consult the api documentation of <a href="api/ng.directive:ngRepeat"><code>ngRepeat</code></a> to learn more about valid syntax.</p>
|
||||
</div></div>
|
||||
</div>
|
20
lib/angular/docs/partials/error/ngRepeat:iidexp.html
Executable file
20
lib/angular/docs/partials/error/ngRepeat:iidexp.html
Executable file
|
@ -0,0 +1,20 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ngRepeat/iidexp.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid Identifier</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">ngRepeat</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.">'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngrepeat-page ngrepeat-iidexp-page"><p>Occurs when there is an error in the identifier part of <a href="api/ng.directive:ngRepeat"><code>ngRepeat</code></a>'s expression.</p>
|
||||
<p>To resolve, use either a valid identifier or a tuple (<em>key</em>, <em>value</em>) where both <em>key</em> and <em>value</em> are valid identifiers.</p>
|
||||
<p>Examples of <em>invalid</em> syntax:</p>
|
||||
<pre><code><div ng-repeat="33 in users">
|
||||
</div>
|
||||
<div ng-repeat="someFn() in users"></div>
|
||||
<div ng-repeat="some user in users"></div></code></pre>
|
||||
<p>Examples of <em>valid</em> syntax:</p>
|
||||
<pre><code><div ng-repeat="user in users"></div>
|
||||
<div ng-repeat="(id, user) in userMap"></div></code></pre>
|
||||
<p>Please consult the api documentation of <a href="api/ng.directive:ngRepeat"><code>ngRepeat</code></a> to learn more about valid syntax.</p>
|
||||
</div></div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue