Upgrade to angularjs 1.2.0 rc1

This commit is contained in:
Colin Frei 2013-08-21 19:46:51 +02:00
parent d223dfd662
commit d6b021bfaf
674 changed files with 79667 additions and 62269 deletions

View 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>

View 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>

View 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(&#39;myDirective&#39;, function() {
return {
require: &#39;ngModel&#39;,
...
}
}</code></pre>
<p>This directive can then be used as:</p>
<pre><code>&lt;input ng-model=&quot;some.path&quot; my-directive&gt;</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(&#39;myDirective&#39;, function() {
return {
require: &#39;^?form&#39;,
...
}
}</code></pre>
<p>This directive can then be used as:</p>
<pre><code>&lt;form name=&quot;myForm&quot;&gt;
&lt;div&gt;
&lt;span my-directive&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/form&gt;</code></pre>
</div></div>
</div>

View 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>@&amp;=</code>) with an optional local name.</p>
<pre><code>myModule.directive(&#39;directiveName&#39;, function factory() {
return {
...
scope: {
&#39;attrName&#39;: &#39;@&#39;, // OK
&#39;attrName2&#39;: &#39;=localName&#39;, // OK
&#39;attrName3&#39;: &#39;name&#39;, // ERROR: missing mode @&amp;=
&#39;attrName4&#39;: &#39; = name&#39;, // ERROR: extra spaces
&#39;attrName5&#39;: &#39;name=&#39;, // ERROR: must be prefixed with @&amp;=
}
...
}
});</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>

View 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>

View 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>&lt;input ng-mode=&quot;username&quot;&gt;
&lt;div onclick=&quot;{{username}}&quot;&gt;click me&lt;/div&gt;</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(&#39;PWND&#39;)</code> would result in script injection when the <code>div</code> is clicked.</p>
</div></div>
</div>

View 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(&#39;myDirective&#39;, function factory() {
return {
...
scope: {
&#39;bind&#39;: &#39;=localValue&#39;
}
...
}
});</code></pre>
<p>Following are invalid uses of this directive:</p>
<pre><code>&lt;my-directive bind=&quot;1+2&quot;&gt; &lt;!-- ERROR because `1+2=localValue` is an invalid statement --&gt;
&lt;my-directive bind=&quot;myFn()&quot;&gt; &lt;!-- ERROR because `myFn()=localValue` is an invalid statement --&gt;</code></pre>
<p>To resolve this error, always use path expressions with scope properties that are two-way data-bound:</p>
<pre><code>&lt;my-directive bind=&quot;some.property&quot;&gt;
&lt;my-directive bind=&quot;some[3][&#39;property&#39;]&quot;&gt;</code></pre>
</div></div>
</div>

View 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>&lt;select ng-model=&quot;some.model&quot; multiple=&quot;{{mode}}&quot;&gt;&lt;/select&gt;</code></pre>
<p>Example that uses ngIf to pick one of the <code>select</code> elements based on a variable:</p>
<pre><code>&lt;select ng-if=&quot;mode == &#39;multiple&#39;&quot; ng-model=&quot;some.model&quot; multiple&gt;&lt;/select&gt;
&lt;select ng-if=&quot;mode != &#39;multiple&#39;&quot; ng-model=&quot;some.model&quot;&gt;&lt;/select&gt;</code></pre>
</div></div>
</div>

View 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>

View 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(&#39;myDirective&#39;, function factory() {
return {
...
replace: true,
templateUrl: &#39;someUrl&#39;
...
}
});</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>&lt;div&gt;&lt;b&gt;Hello&lt;/b&gt; World!&lt;/div&gt;</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>&lt;b&gt;Hello&lt;/b&gt; World!</code></pre>
</div></div>
</div>

View 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>&lt;table&gt;
&lt;tr ng-repeat-start=&quot;item in list&quot;&gt;I get repeated&lt;/tr&gt;
&lt;tr ng-repeat-end&gt;I also get repeated&lt;/tr&gt;
&lt;/table&gt;</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>&lt;div&gt;
&lt;span foo-start&gt;&lt;/span&gt;
&lt;/div&gt;</code></pre>
<p>Another is by nesting a <code>directive-end</code> inside of <code>directive-start</code>, or vice versa:</p>
<pre><code>&lt;div&gt;
&lt;span foo-start&gt;&lt;span foo-end&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;</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>

View 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>

View 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>

View 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(&#39;myApp&#39;, [])
.factory(&#39;myService&#39;, function (myService) {
// ...
})
.controller(&#39;MyCtrl&#39;, 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>

View 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 = [&#39;$scope&#39;, 42];
myAppModule.controller(&#39;MyCtrl&#39;, [&#39;$scope&#39;, {}, 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>

View 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>

View 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 &quot;re-open&quot; 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(&#39;myApp&#39;, []);</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(&#39;myApp&#39;);</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>

View 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(&quot;myApp&quot;, [])
.provider(&#39;bad&#39;, 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(&quot;myApp&quot;, [])
.provider(&#39;good&#39;, 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>

View 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(&#39;myApp&#39;, [])
.controller(&#39;myCtrl&#39;, [&#39;myService&#39;, 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(&#39;myApp&#39;, [])
.service(&#39;myService&#39;, function () { /* ... */ })
.controller(&#39;myCtrl&#39;, [&#39;myService&#39;, function (myService) {
// Do something with myService
}]);</code></pre>
</div></div>
</div>

View 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>

View 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>

View 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 &quot;{0}&quot;, missing hash prefix &quot;{1}&quot;.">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>&#39;!&#39;</code>:</p>
<pre><code>myApp.config(function($locationProvider) {
$locationProvider.prefix(&#39;!&#39;);
});</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>&#39;!&#39;</code> after <code>&#39;#&#39;</code> symbol).</p>
</div></div>
</div>

View 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 &quot;{0}&quot;, missing path prefix &quot;{1}&quot;.">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>&lt;base&gt;</code> element and try to update the location with a path that doesn&#39;t match the base prefix.</p>
<p>To resolve this issue, please check the base url specified via the <code>&lt;base&gt;</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>

View 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>

View 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 &quot;constructor&quot; 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>&lt;div&gt;{{user.constructor.name}}&lt;/div&gt;</code></pre>
</div></div>
</div>

View 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 &#39;Function&#39; 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>

View 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&#39;s syntax.</p>
</div></div>
</div>

View 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&#39;s syntax.</p>
</div></div>
</div>

View 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&#39;s syntax.</p>
</div></div>
</div>

View 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>

View 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>

View 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&#39;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(&#39;foo&#39;, function() {
$scope.foo = $scope.foo + 1;
});</code></pre>
</div></div>
</div>

View 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&#39;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(&#39;myDirective&#39;, function() {
return {
link: function($scope, $element) {
function doSomeWork() {
$scope.$apply(function() {
// do work here, and update the model
};
}
$element.on(&#39;click&#39;, doSomeWork);
doSomeWork(); // &lt;&lt; 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(&#39;myDirective&#39;, function() {
return {
link: function($scope, $element) {
function doSomeWork() {
// do work here, and update the model
}
$element.on(&#39;click&#39;, function() {
$scope.$apply(doSomeWork); // &lt;&lt;&lt; the $apply call was moved to the callsite that doesn&#39;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>

View 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 &#39;$sanitize&#39; can&#39;t be parsed by the sanitizer.
The error contains part of the html string that can&#39;t be parsed.</p>
<p>The parser is more strict than a typical browser parser, so it&#39;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>

View 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>

View 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 &lt; 9 in quirks mode. You can fix this by adding the text &lt;!doctype html&gt; 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 &gt; IEBlog &gt; 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>&lt;!doctype html&gt;</code></pre>
</div></div>
</div>

View 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&#39; <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&#39;re attempting to load an Angular template from an untrusted source.
It&#39;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&#39;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&#39;t work on all browsers nor <code>file://</code> requests on some browsers)</p>
</div></div>
</div>

View 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>

View 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&#39;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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>&lt;html&gt;
...
&lt;body ng-app=&quot;myApp&quot;&gt;
&lt;script&gt;
angular.bootstrap(document.body, [&#39;myApp&#39;]);
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
<p>Note that for bootrapping purposes, the <code>&lt;html&gt;</code> element is the same as <code>document</code>, so the following will also throw an error.</p>
<pre><code>&lt;html&gt;
...
&lt;script&gt;
angular.bootstrap(document, [&#39;myApp&#39;]);
&lt;/script&gt;
&lt;/html&gt;</code></pre>
</div></div>
</div>

View 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>

View 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>

View 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>&lt;input ng-model=&quot;namedVariable&quot;&gt;
&lt;input ng-model=&quot;myObj.someProperty&quot;&gt;
&lt;input ng-model=&quot;indexedArray[0]&quot;&gt;</code></pre>
<p>Examples of non-assignable expressions include:</p>
<pre><code>&lt;input ng-model=&quot;foo + bar&quot;&gt;
&lt;input ng-model=&quot;42&quot;&gt;
&lt;input ng-model=&quot;&#39;oops&#39;&quot;&gt;
&lt;input ng-model=&quot;myFunc()&quot;&gt;</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>

View 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 &#39;ngOptions&#39; is passed an expression that isn&#39;t in an expected form.</p>
<p>Here&#39;s an example of correct syntax:</p>
<pre><code>&lt;select ng-model=&quot;color&quot; ng-options=&quot;c.name for c in colors&quot;&gt;</code></pre>
<p>For more information on valid expression syntax, see &#39;ngOptions&#39; in <a href="api/ng.directive:select"><code>select</code></a> directive docs.</p>
</div></div>
</div>

View 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 &#39;ngPattern&#39; is passed an expression that isn&#39;t a regular expression or doesn&#39;t have the expected format.</p>
<p>For more information on valid expression syntax, see &#39;ngPattern&#39; in <a href="api/ng.directive:select"><code>input</code></a> directive docs.</p>
</div></div>
</div>

View 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>&lt;div ng-repeat=&quot;value in [4, 4]&quot;&gt;
&lt;/div&gt;</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>&lt;div ng-repeat=&quot;value in [4, 4] track by $index&quot;&gt;&lt;/div&gt;</code></pre>
</div></div>
</div>

View 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>&#39;s expression. The expression should be in the form &#39;<em>item</em> in <em>collection</em>[ track by <em>id</em>]&#39;.</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 &#39;in&#39; and &#39;track by&#39; 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>

View 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>&#39;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>&lt;div ng-repeat=&quot;33 in users&quot;&gt;
&lt;/div&gt;
&lt;div ng-repeat=&quot;someFn() in users&quot;&gt;&lt;/div&gt;
&lt;div ng-repeat=&quot;some user in users&quot;&gt;&lt;/div&gt;</code></pre>
<p>Examples of <em>valid</em> syntax:</p>
<pre><code>&lt;div ng-repeat=&quot;user in users&quot;&gt;&lt;/div&gt;
&lt;div ng-repeat=&quot;(id, user) in userMap&quot;&gt;&lt;/div&gt;</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>