Update Angular to 1.2.0 RC2
This commit is contained in:
parent
7416269494
commit
0d3a40980e
184 changed files with 17993 additions and 21133 deletions
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/auto/injector.js#L76" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/auto/injector.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$injector</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/auto/injector.js#L78" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/auto/injector.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$injector</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">AUTO</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/auto/injector.js#L263" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/auto/injector.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$provide</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/auto/injector.js#L265" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/auto/injector.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$provide</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">AUTO</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L734" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.bind</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L744" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.bind</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L1034" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.bootstrap</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L1044" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.bootstrap</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L580" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.copy</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L590" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.copy</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L657" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.equals</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L667" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.equals</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L223" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.extend</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L233" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.extend</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L98" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.forEach</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L108" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.forEach</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L806" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.fromJson</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L816" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.fromJson</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L278" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.identity</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L288" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.identity</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L386" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isArray</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L396" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isArray</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L370" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isDate</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L380" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isDate</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L313" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isDefined</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L323" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isDefined</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L470" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isElement</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L480" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isElement</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L402" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isFunction</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L412" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isFunction</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L356" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isNumber</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L366" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isNumber</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L327" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isObject</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L337" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isObject</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L342" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isString</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L352" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isString</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L299" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isUndefined</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L309" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.isUndefined</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngMock/angular-mocks.js#L1874" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngMock/angular-mocks.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.mock.inject</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngMock/angular-mocks.js#L1884" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngMock/angular-mocks.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.mock.inject</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -11,8 +11,10 @@ which will be used when the injector is created by <a href="api/angular.mock.inj
|
|||
</div></div>
|
||||
<h2 id="Usage">Usage</h2>
|
||||
<div class="usage"><pre class="prettyprint linenums">angular.mock.module(fns);</pre>
|
||||
<h4 id="parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>fns</td><td><a href="" class="label type-hint type-hint-object">...(string</a><a href="" class="label type-hint type-hint-function">Function</a></td><td><div class="angular-mock-module-page"><p>any number of modules which are represented as string
|
||||
<h4 id="parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>fns</td><td><a href="" class="label type-hint type-hint-object">...(string</a><a href="" class="label type-hint type-hint-function">Function</a><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="angular-mock-module-page"><p>any number of modules which are represented as string
|
||||
aliases or as anonymous module initialization functions. The modules are used to
|
||||
configure the injector. The 'ng' and 'ngMock' modules are automatically loaded.</p>
|
||||
configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an
|
||||
object literal is passed they will be register as values in the module, the key being
|
||||
the module name and the value being what is returned.</p>
|
||||
</div></td></tr></tbody></table></div>
|
||||
</div>
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
</div>
|
||||
</h1>
|
||||
<div><h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="angular-module-page"><p>The <code>angular.module</code> is a global place for creating and registering Angular modules. All
|
||||
modules (angular core or 3rd party) that should be available to an application must be
|
||||
<div class="description"><div class="angular-module-page"><p>The <code>angular.module</code> is a global place for creating, registering and retrieving Angular modules.
|
||||
All modules (angular core or 3rd party) that should be available to an application must be
|
||||
registered using this mechanism.</p>
|
||||
<p>When passed two or more arguments, a new module is created. If passed only one argument, an
|
||||
existing module (the name passed as the first argument to <code>module</code>) is retrieved.</p>
|
||||
<h3>Module</h3>
|
||||
<p>A module is a collection of services, directives, filters, and configuration information.
|
||||
<code>angular.module</code> is used to configure the <a href="api/AUTO.$injector"><code>$injector</code></a>.</p>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L259" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.noop</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L269" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.noop</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L787" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.toJson</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L797" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">angular.toJson</code>
|
||||
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -200,6 +200,7 @@ takes a <a href="api/ng.$q"><code>promise</code></a> and returns the original or
|
|||
return function(promise) {
|
||||
return promise.then(function(response) {
|
||||
// do something on success
|
||||
return response;
|
||||
}, function(response) {
|
||||
// do something on error
|
||||
if (canRecover(response)) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ng/interpolate.js#L79" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ng/interpolate.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$interpolate</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ng/interpolate.js#L88" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ng/interpolate.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$interpolate</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -23,29 +23,41 @@
|
|||
</div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-interpolateprovider-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-130" source-edit-css="" source-edit-js="script.js-129" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div source-edit="customInterpolationApp" source-edit-deps="angular.js script.js" source-edit-html="index.html-130" source-edit-css="" source-edit-js="script.js-129" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-131"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-130" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-130" ng-html-wrap="customInterpolationApp angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-130">
|
||||
|
||||
<div ng-app="App" ng-controller="Controller">
|
||||
//label//
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<div ng-app="App" ng-controller="DemoController as demo">
|
||||
//demo.label//
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-129"></pre>
|
||||
<script type="text/ng-template" id="script.js-129">
|
||||
var myApp = angular.module('App', [], function($interpolateProvider) {
|
||||
$interpolateProvider.startSymbol('//');
|
||||
$interpolateProvider.endSymbol('//');
|
||||
});
|
||||
function Controller($scope) {
|
||||
$scope.label = "Interpolation Provider Sample";
|
||||
}
|
||||
</script>
|
||||
var customInterpolationApp = angular.module('customInterpolationApp', []);
|
||||
|
||||
customInterpolationApp.config(function($interpolateProvider) {
|
||||
$interpolateProvider.startSymbol('//');
|
||||
$interpolateProvider.endSymbol('//');
|
||||
});
|
||||
|
||||
|
||||
customInterpolationApp.controller('DemoController', function DemoController() {
|
||||
this.label = "This bindings is brought you you by // interpolation symbols.";
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-131"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-131">
|
||||
it('should interpolate binding with custom symbols', function() {
|
||||
expect(binding('demo.label')).toBe('This bindings is brought you you by // interpolation symbols.');
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-130" ng-eval-javascript="script.js-129"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="customInterpolationApp" ng-set-html="index.html-130" ng-eval-javascript="script.js-129"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -37,10 +37,10 @@ into the browser's console (if present).</p>
|
|||
</div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-log-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-132" source-edit-css="" source-edit-js="script.js-131" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-133" source-edit-css="" source-edit-js="script.js-132" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-132" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-132">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-133" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-133">
|
||||
<div ng-controller="LogCtrl">
|
||||
<p>Reload this page with open console, enter text and hit the log button...</p>
|
||||
Message:
|
||||
|
@ -53,8 +53,8 @@ into the browser's console (if present).</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-131"></pre>
|
||||
<script type="text/ng-template" id="script.js-131">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-132"></pre>
|
||||
<script type="text/ng-template" id="script.js-132">
|
||||
function LogCtrl($scope, $log) {
|
||||
$scope.$log = $log;
|
||||
$scope.message = 'Hello World!';
|
||||
|
@ -62,6 +62,6 @@ into the browser's console (if present).</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-132" ng-eval-javascript="script.js-131"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-133" ng-eval-javascript="script.js-132"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ng/parse.js#L916" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ng/parse.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$parse</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ng/parse.js#L927" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ng/parse.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$parse</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -21,6 +21,8 @@ asynchronous programming what <code>try</code>, <code>catch</code> and <code>thr
|
|||
// since this fn executes async in a future turn of the event loop, we need to wrap
|
||||
// our code into an $apply call so that the model changes are properly observed.
|
||||
scope.$apply(function() {
|
||||
deferred.notify('About to greet ' + name + '.');
|
||||
|
||||
if (okToGreet(name)) {
|
||||
deferred.resolve('Hello, ' + name + '!');
|
||||
} else {
|
||||
|
@ -37,6 +39,8 @@ asynchronous programming what <code>try</code>, <code>catch</code> and <code>thr
|
|||
alert('Success: ' + greeting);
|
||||
}, function(reason) {
|
||||
alert('Failed: ' + reason);
|
||||
}, function(update) {
|
||||
alert('Got notification: ' + update);
|
||||
});
|
||||
</pre>
|
||||
<p>At first it might not be obvious why this extra complexity is worth the trouble. The payoff
|
||||
|
@ -49,13 +53,16 @@ section on serial or parallel joining of promises.</p>
|
|||
<h3>The Deferred API</h1>
|
||||
<p>A new instance of deferred is constructed by calling <code>$q.defer()</code>.</p>
|
||||
<p>The purpose of the deferred object is to expose the associated Promise instance as well as APIs
|
||||
that can be used for signaling the successful or unsuccessful completion of the task.</p>
|
||||
that can be used for signaling the successful or unsuccessful completion, as well as the status
|
||||
of the task.</p>
|
||||
<p><strong>Methods</strong></p>
|
||||
<ul>
|
||||
<li><code>resolve(value)</code> – resolves the derived promise with the <code>value</code>. If the value is a rejection
|
||||
constructed via <code>$q.reject</code>, the promise will be rejected instead.</li>
|
||||
<li><code>reject(reason)</code> – rejects the derived promise with the <code>reason</code>. This is equivalent to
|
||||
resolving it with a rejection constructed via <code>$q.reject</code>.</li>
|
||||
<li><code>notify(value)</code> - provides updates on the status of the promises execution. This may be called
|
||||
multiple times before the promise is either resolved or rejected.</li>
|
||||
</ul>
|
||||
<p><strong>Properties</strong></p>
|
||||
<ul>
|
||||
|
@ -68,11 +75,14 @@ calling <code>deferred.promise</code>.</p>
|
|||
of the deferred task when it completes.</p>
|
||||
<p><strong>Methods</strong></p>
|
||||
<ul>
|
||||
<li><p><code>then(successCallback, errorCallback)</code> – regardless of when the promise was or will be resolved
|
||||
or rejected, <code>then</code> calls one of the success or error callbacks asynchronously as soon as the result
|
||||
is available. The callbacks are called with a single argument: the result or rejection reason.</p>
|
||||
<li><p><code>then(successCallback, errorCallback, notifyCallback)</code> – regardless of when the promise was or
|
||||
will be resolved or rejected, <code>then</code> calls one of the success or error callbacks asynchronously
|
||||
as soon as the result is available. The callbacks are called with a single argument: the result
|
||||
or rejection reason. Additionally, the notify callback may be called zero or more times to
|
||||
provide a progress indication, before the promise is resolved or rejected.</p>
|
||||
<p>This method <em>returns a new promise</em> which is resolved or rejected via the return value of the
|
||||
<code>successCallback</code> or <code>errorCallback</code>.</p>
|
||||
<code>successCallback</code>, <code>errorCallback</code>. It also notifies via the return value of the <code>notifyCallback</code>
|
||||
method. The promise can not be resolved or rejected from the notifyCallback method.</p>
|
||||
</li>
|
||||
<li><p><code>catch(errorCallback)</code> – shorthand for <code>promise.then(null, errorCallback)</code></p>
|
||||
</li>
|
||||
|
|
|
@ -196,12 +196,14 @@ expression are propagated (uncaught). This is useful when evaluating Angular exp
|
|||
<div class="$evalasync"><div class="ng-rootscope-scope-evalasync-page"><p>Executes the expression on the current scope at a later point in time.</p>
|
||||
<p>The <code>$evalAsync</code> makes no guarantees as to when the <code>expression</code> will be executed, only that:</p>
|
||||
<ul>
|
||||
<li>it will execute in the current script execution context (before any DOM rendering).</li>
|
||||
<li>at least one <a href="api/ng.$rootScope.Scope#$digest"><code>$digest cycle</code></a> will be performed after
|
||||
<code>expression</code> execution.</li>
|
||||
<li>it will execute after the function that schedule the evaluation is done running (preferably before DOM rendering).</li>
|
||||
<li>at least one <a href="api/ng.$rootScope.Scope#$digest"><code>$digest cycle</code></a> will be performed after <code>expression</code> execution.</li>
|
||||
</ul>
|
||||
<p>Any exceptions from the execution of the expression are forwarded to the
|
||||
<a href="api/ng.$exceptionHandler"><code>$exceptionHandler</code></a> service.</p>
|
||||
<p><strong>Note:</strong> if this function is called outside of <code>$digest</code> cycle, a new $digest cycle will be scheduled.
|
||||
It is however encouraged to always call code that changes the model from withing an <code>$apply</code> call.
|
||||
That includes code evaluated via <code>$evalAsync</code>.</p>
|
||||
</div><h5 id="parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>expression <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a><a href="" class="label type-hint type-hint-function">function()</a></td><td><div class="ng-rootscope-scope-evalasync-page"><p>An angular expression to be executed.</p>
|
||||
<ul>
|
||||
<li><code>string</code>: execute using the rules as defined in <a href="guide/expression">expression</a>.</li>
|
||||
|
|
|
@ -47,7 +47,7 @@ accepted by SCE / privileged contexts.</p>
|
|||
<h4>How does it work?</h2>
|
||||
<p>In privileged contexts, directives and code will bind to the result of <a href="../../../../../index.htmle#getTrusted"><code>$sce.getTrusted(context, value)</code></a> rather than to the value directly. Directives use <a href="../../../../../index.htmle#parse"><code>$sce.parseAs</code></a> rather than <code>$parse</code> to watch attribute bindings, which performs the
|
||||
<a href="../../../../../index.htmle#getTrusted"><code>$sce.getTrusted</code></a> behind the scenes on non-constant literals.</p>
|
||||
<p>As an example, <a href="../../../../../index.htmlective:ngBindHtml"><code>ngBindHtml</code></a> uses <a href="../../../../../index.htmle#parseHtml"><code>$sce.parseAsHtml(binding expression)</code></a>. Here's the actual code (slightly
|
||||
<p>As an example, <a href="../../../../../index.htmlective:ngBindHtml"><code>ngBindHtml</code></a> uses <a href="../../../../../index.htmle#parseAsHtml"><code>$sce.parseAsHtml(binding expression)</code></a>. Here's the actual code (slightly
|
||||
simplified):</p>
|
||||
<pre class="prettyprint" class="prettyprint linenums">
|
||||
var ngBindHtmlDirective = ['$sce', function($sce) {
|
||||
|
@ -86,13 +86,36 @@ served document. You can change these by setting your own custom <a href="../..
|
|||
application that's secure and can be audited to verify that with much more ease than bolting
|
||||
security onto an application later.</p>
|
||||
<h2>What trusted context types are supported?<a name="contexts"></a></h2>
|
||||
<p>| Context | Notes |
|
||||
|=====================|================|
|
||||
| <code>$sce.HTML</code> | For HTML that's safe to source into the application. The <a href="../../../../../index.htmlective:ngBindHtml"><code>ngBindHtml</code></a> directive uses this context for bindings. |
|
||||
| <code>$sce.CSS</code> | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |
|
||||
| <code>$sce.URL</code> | For URLs that are safe to follow as links. Currently unused (<code><a href=</code> and <code><img src=</code> sanitize their urls and don't consititute an SCE context. |
|
||||
| <code>$sce.RESOURCE_URL</code> | For URLs that are not only safe to follow as links, but whose contens are also safe to include in your application. Examples include <code>ng-include</code>, <code>src</code> / <code>ngSrc</code> bindings for tags other than <code>IMG</code> (e.g. <code>IFRAME</code>, <code>OBJECT</code>, etc.) <br><br>Note that <code>$sce.RESOURCE_URL</code> makes a stronger statement about the URL than <code>$sce.URL</code> does and therefore contexts requiring values trusted for <code>$sce.RESOURCE_URL</code> can be used anywhere that values trusted for <code>$sce.URL</code> are required. |
|
||||
| <code>$sce.JS</code> | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Context</th>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>$sce.HTML</code></td>
|
||||
<td>For HTML that's safe to source into the application. The <a href="../../../../../index.htmlective:ngBindHtml"><code>ngBindHtml</code></a> directive uses this context for bindings.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>$sce.CSS</code></td>
|
||||
<td>For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>$sce.URL</code></td>
|
||||
<td>For URLs that are safe to follow as links. Currently unused (<code><a href=</code> and <code><img src=</code> sanitize their urls and don't consititute an SCE context.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>$sce.RESOURCE_URL</code></td>
|
||||
<td>For URLs that are not only safe to follow as links, but whose contens are also safe to include in your application. Examples include <code>ng-include</code>, <code>src</code> / <code>ngSrc</code> bindings for tags other than <code>IMG</code> (e.g. <code>IFRAME</code>, <code>OBJECT</code>, etc.) <br><br>Note that <code>$sce.RESOURCE_URL</code> makes a stronger statement about the URL than <code>$sce.URL</code> does and therefore contexts requiring values trusted for <code>$sce.RESOURCE_URL</code> can be used anywhere that values trusted for <code>$sce.URL</code> are required.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>$sce.JS</code></td>
|
||||
<td>For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2>Show me an example.</h4>
|
||||
</div></div>
|
||||
<div class="member method"><h2 id="Methods">Methods</h2>
|
||||
|
@ -266,10 +289,10 @@ have to do it at module config time on <a href="../../../../../index.htmleProvid
|
|||
</div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-sce-page"><h4>Source</h2>
|
||||
<div source-edit="mySceApp" source-edit-deps="angular.js script.js" source-edit-html="index.html-133" source-edit-css="" source-edit-js="script.js-134" source-edit-json="test_data.json" source-edit-unit="" source-edit-scenario="scenario.js-135"></div>
|
||||
<div source-edit="mySceApp" source-edit-deps="angular.js script.js" source-edit-html="index.html-134" source-edit-css="" source-edit-js="script.js-135" source-edit-json="test_data.json" source-edit-unit="" source-edit-scenario="scenario.js-136"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-133" ng-html-wrap="mySceApp angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-133">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-134" ng-html-wrap="mySceApp angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-134">
|
||||
<div ng-controller="myAppController as myCtrl">
|
||||
<i ng-bind-html="myCtrl.explicitlyTrustedHtml" id="explicitlyTrustedHtml"></i><br><br>
|
||||
<b>User comments</b><br>
|
||||
|
@ -285,8 +308,8 @@ have to do it at module config time on <a href="../../../../../index.htmleProvid
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-134"></pre>
|
||||
<script type="text/ng-template" id="script.js-134">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-135"></pre>
|
||||
<script type="text/ng-template" id="script.js-135">
|
||||
var mySceApp = angular.module('mySceApp', ['ngSanitize']);
|
||||
|
||||
mySceApp.controller("myAppController", function myAppController($http, $templateCache, $sce) {
|
||||
|
@ -314,8 +337,8 @@ have to do it at module config time on <a href="../../../../../index.htmleProvid
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-135"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-135">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-136"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-136">
|
||||
describe('SCE doc demo', function() {
|
||||
it('should sanitize untrusted values', function() {
|
||||
expect(element('.htmlComment').html()).toBe('<span>Is <i>anyone</i> reading this?</span>');
|
||||
|
@ -329,7 +352,7 @@ have to do it at module config time on <a href="../../../../../index.htmleProvid
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h2>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="mySceApp" ng-set-html="index.html-133" ng-eval-javascript="script.js-134"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="mySceApp" ng-set-html="index.html-134" ng-eval-javascript="script.js-135"></div>
|
||||
<h2>Can I disable SCE completely?</h4>
|
||||
<p>Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits
|
||||
for little coding overhead. It will be much harder to take an SCE disabled application and
|
||||
|
|
|
@ -15,10 +15,10 @@ expression.</p>
|
|||
</div></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-window-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-137" source-edit-css="" source-edit-js="script.js-136" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-138"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-138" source-edit-css="" source-edit-js="script.js-137" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-139"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-137" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-137">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-138" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-138">
|
||||
|
||||
<div ng-controller="Ctrl">
|
||||
<input type="text" ng-model="greeting" />
|
||||
|
@ -27,8 +27,8 @@ expression.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-136"></pre>
|
||||
<script type="text/ng-template" id="script.js-136">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-137"></pre>
|
||||
<script type="text/ng-template" id="script.js-137">
|
||||
function Ctrl($scope, $window) {
|
||||
$scope.$window = $window;
|
||||
$scope.greeting = 'Hello, World!';
|
||||
|
@ -36,8 +36,8 @@ expression.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-138"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-138">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-139"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-139">
|
||||
it('should display the greeting in the input box', function() {
|
||||
input('greeting').enter('Hello, E2E Tests');
|
||||
// If we click the button it will block the test runner
|
||||
|
@ -46,6 +46,6 @@ expression.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-137" ng-eval-javascript="script.js-136"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-138" ng-eval-javascript="script.js-137"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -22,10 +22,10 @@ interaction with the input element.</p>
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-input-checkbox-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-51" source-edit-css="" source-edit-js="script.js-50" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-52"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-38" source-edit-css="" source-edit-js="script.js-37" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-39"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-51" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-51">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-38" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-38">
|
||||
|
||||
<form name="myForm" ng-controller="Ctrl">
|
||||
Value1: <input type="checkbox" ng-model="value1"> <br/>
|
||||
|
@ -37,8 +37,8 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-50"></pre>
|
||||
<script type="text/ng-template" id="script.js-50">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-37"></pre>
|
||||
<script type="text/ng-template" id="script.js-37">
|
||||
function Ctrl($scope) {
|
||||
$scope.value1 = true;
|
||||
$scope.value2 = 'YES'
|
||||
|
@ -46,8 +46,8 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-52"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-52">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-39"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-39">
|
||||
it('should change state', function() {
|
||||
expect(binding('value1')).toEqual('true');
|
||||
expect(binding('value2')).toEqual('YES');
|
||||
|
@ -60,6 +60,6 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-51" ng-eval-javascript="script.js-50"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-38" ng-eval-javascript="script.js-37"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -35,10 +35,10 @@ interaction with the input element.</p>
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-input-email-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-45" source-edit-css="" source-edit-js="script.js-44" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-46"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-32" source-edit-css="" source-edit-js="script.js-31" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-33"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-45" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-45">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-32" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-32">
|
||||
|
||||
<form name="myForm" ng-controller="Ctrl">
|
||||
Email: <input type="email" name="input" ng-model="text" required>
|
||||
|
@ -56,16 +56,16 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-44"></pre>
|
||||
<script type="text/ng-template" id="script.js-44">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-31"></pre>
|
||||
<script type="text/ng-template" id="script.js-31">
|
||||
function Ctrl($scope) {
|
||||
$scope.text = 'me@example.com';
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-46"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-46">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-33"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-33">
|
||||
it('should initialize to model', function() {
|
||||
expect(binding('text')).toEqual('me@example.com');
|
||||
expect(binding('myForm.input.$valid')).toEqual('true');
|
||||
|
@ -84,6 +84,6 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-45" ng-eval-javascript="script.js-44"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-32" ng-eval-javascript="script.js-31"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -34,10 +34,10 @@ interaction with the input element.</p>
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-input-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-54" source-edit-css="" source-edit-js="script.js-53" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-55"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-41" source-edit-css="" source-edit-js="script.js-40" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-42"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-54" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-54">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-41" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-41">
|
||||
|
||||
<div ng-controller="Ctrl">
|
||||
<form name="myForm">
|
||||
|
@ -65,16 +65,16 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-53"></pre>
|
||||
<script type="text/ng-template" id="script.js-53">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-40"></pre>
|
||||
<script type="text/ng-template" id="script.js-40">
|
||||
function Ctrl($scope) {
|
||||
$scope.user = {name: 'guest', last: 'visitor'};
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-55"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-55">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-42"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-42">
|
||||
it('should initialize to model', function() {
|
||||
expect(binding('user')).toEqual('{"name":"guest","last":"visitor"}');
|
||||
expect(binding('myForm.userName.$valid')).toEqual('true');
|
||||
|
@ -114,6 +114,6 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-54" ng-eval-javascript="script.js-53"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-41" ng-eval-javascript="script.js-40"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -39,10 +39,10 @@ interaction with the input element.</p>
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-input-number-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-39" source-edit-css="" source-edit-js="script.js-38" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-40"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-26" source-edit-css="" source-edit-js="script.js-25" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-27"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-39" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-39">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-26" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-26">
|
||||
|
||||
<form name="myForm" ng-controller="Ctrl">
|
||||
Number: <input type="number" name="input" ng-model="value"
|
||||
|
@ -60,16 +60,16 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-38"></pre>
|
||||
<script type="text/ng-template" id="script.js-38">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-25"></pre>
|
||||
<script type="text/ng-template" id="script.js-25">
|
||||
function Ctrl($scope) {
|
||||
$scope.value = 12;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-40"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-40">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-27"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-27">
|
||||
it('should initialize to model', function() {
|
||||
expect(binding('value')).toEqual('12');
|
||||
expect(binding('myForm.input.$valid')).toEqual('true');
|
||||
|
@ -89,6 +89,6 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-39" ng-eval-javascript="script.js-38"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-26" ng-eval-javascript="script.js-25"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -20,10 +20,10 @@ interaction with the input element.</p>
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-input-radio-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-48" source-edit-css="" source-edit-js="script.js-47" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-49"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-35" source-edit-css="" source-edit-js="script.js-34" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-36"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-48" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-48">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-35" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-35">
|
||||
|
||||
<form name="myForm" ng-controller="Ctrl">
|
||||
<input type="radio" ng-model="color" value="red"> Red <br/>
|
||||
|
@ -34,16 +34,16 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-47"></pre>
|
||||
<script type="text/ng-template" id="script.js-47">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-34"></pre>
|
||||
<script type="text/ng-template" id="script.js-34">
|
||||
function Ctrl($scope) {
|
||||
$scope.color = 'blue';
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-49"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-49">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-36"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-36">
|
||||
it('should change state', function() {
|
||||
expect(binding('color')).toEqual('blue');
|
||||
|
||||
|
@ -53,6 +53,6 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-48" ng-eval-javascript="script.js-47"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-35" ng-eval-javascript="script.js-34"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -37,10 +37,10 @@ input.</p>
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-input-text-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-36" source-edit-css="" source-edit-js="script.js-35" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-37"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-23" source-edit-css="" source-edit-js="script.js-22" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-24"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-36" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-36">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-23" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-23">
|
||||
|
||||
<form name="myForm" ng-controller="Ctrl">
|
||||
Single word: <input type="text" name="input" ng-model="text"
|
||||
|
@ -59,8 +59,8 @@ input.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-35"></pre>
|
||||
<script type="text/ng-template" id="script.js-35">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-22"></pre>
|
||||
<script type="text/ng-template" id="script.js-22">
|
||||
function Ctrl($scope) {
|
||||
$scope.text = 'guest';
|
||||
$scope.word = /^\s*\w*\s*$/;
|
||||
|
@ -68,8 +68,8 @@ input.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-37"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-37">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-24"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-24">
|
||||
it('should initialize to model', function() {
|
||||
expect(binding('text')).toEqual('guest');
|
||||
expect(binding('myForm.input.$valid')).toEqual('true');
|
||||
|
@ -94,6 +94,6 @@ input.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-36" ng-eval-javascript="script.js-35"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-23" ng-eval-javascript="script.js-22"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -35,10 +35,10 @@ interaction with the input element.</p>
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-input-url-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-42" source-edit-css="" source-edit-js="script.js-41" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-43"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-29" source-edit-css="" source-edit-js="script.js-28" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-30"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-42" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-42">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-29" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-29">
|
||||
|
||||
<form name="myForm" ng-controller="Ctrl">
|
||||
URL: <input type="url" name="input" ng-model="text" required>
|
||||
|
@ -56,16 +56,16 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-41"></pre>
|
||||
<script type="text/ng-template" id="script.js-41">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-28"></pre>
|
||||
<script type="text/ng-template" id="script.js-28">
|
||||
function Ctrl($scope) {
|
||||
$scope.text = 'http://google.com';
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-43"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-43">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-30"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-30">
|
||||
it('should initialize to model', function() {
|
||||
expect(binding('text')).toEqual('http://google.com');
|
||||
expect(binding('myForm.input.$valid')).toEqual('true');
|
||||
|
@ -84,6 +84,6 @@ interaction with the input element.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-42" ng-eval-javascript="script.js-41"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-29" ng-eval-javascript="script.js-28"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L958" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngApp</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/Angular.js#L968" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/Angular.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngApp</code>
|
||||
<div><span class="hint">directive in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -14,10 +14,10 @@ The expression is not evaluated when the value change is coming from the model.<
|
|||
</div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-ngchange-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-61" source-edit-css="" source-edit-js="script.js-60" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-62"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-47" source-edit-css="" source-edit-js="script.js-46" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-48"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-61" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-61">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-47" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-47">
|
||||
|
||||
<div ng-controller="Controller">
|
||||
<input type="checkbox" ng-model="confirmed" ng-change="change()" id="ng-change-example1" />
|
||||
|
@ -29,8 +29,8 @@ The expression is not evaluated when the value change is coming from the model.<
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-60"></pre>
|
||||
<script type="text/ng-template" id="script.js-60">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-46"></pre>
|
||||
<script type="text/ng-template" id="script.js-46">
|
||||
function Controller($scope) {
|
||||
$scope.counter = 0;
|
||||
$scope.change = function() {
|
||||
|
@ -40,8 +40,8 @@ The expression is not evaluated when the value change is coming from the model.<
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-62"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-62">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-48"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-48">
|
||||
it('should evaluate the expression if changing from view', function() {
|
||||
expect(binding('counter')).toEqual('0');
|
||||
element('#ng-change-example1').click();
|
||||
|
@ -57,6 +57,6 @@ The expression is not evaluated when the value change is coming from the model.<
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-61" ng-eval-javascript="script.js-60"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-47" ng-eval-javascript="script.js-46"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -28,10 +28,10 @@ element.</p>
|
|||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-ngclass-page"><p>Example that demostrates basic bindings via ngClass directive.
|
||||
<h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-22" source-edit-css="style.css" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-23"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-52" source-edit-css="style.css-53" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-54"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-22" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-22">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-52" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-52">
|
||||
<p ng-class="{strike: strike, bold: bold, red: red}">Map Syntax Example</p>
|
||||
<input type="checkbox" ng-model="bold"> bold
|
||||
<input type="checkbox" ng-model="strike"> strike
|
||||
|
@ -47,8 +47,8 @@ element.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="style.css">
|
||||
<pre class="prettyprint linenums" ng-set-text="style.css"></pre>
|
||||
<style type="text/css" id="style.css">
|
||||
<pre class="prettyprint linenums" ng-set-text="style.css-53"></pre>
|
||||
<style type="text/css" id="style.css-53">
|
||||
.strike {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
@ -61,8 +61,8 @@ element.</p>
|
|||
</style>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-23"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-23">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-54"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-54">
|
||||
it('should let you toggle the class', function() {
|
||||
|
||||
expect(element('.doc-example-live p:first').prop('className')).not().toMatch(/bold/);
|
||||
|
@ -91,14 +91,14 @@ element.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h2>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-22" ng-eval-javascript=""></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-52" ng-eval-javascript=""></div>
|
||||
<h2>Animations</h2>
|
||||
<p>Example that demostrates how addition and removal of classes can be animated.</p>
|
||||
<p>The example below demonstrates how to perform animations using ngClass.</p>
|
||||
<h2>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js angular-animate.js" source-edit-html="index.html-24" source-edit-css="style.css-25" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-26"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js angular-animate.js" source-edit-html="index.html-55" source-edit-css="style.css-56" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-57"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-24" ng-html-wrap=" angular.js angular-animate.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-24">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-55" ng-html-wrap=" angular.js angular-animate.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-55">
|
||||
<input type="button" value="set" ng-click="myVar='my-class'">
|
||||
<input type="button" value="clear" ng-click="myVar=''">
|
||||
<br>
|
||||
|
@ -106,8 +106,8 @@ element.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="style.css">
|
||||
<pre class="prettyprint linenums" ng-set-text="style.css-25"></pre>
|
||||
<style type="text/css" id="style.css-25">
|
||||
<pre class="prettyprint linenums" ng-set-text="style.css-56"></pre>
|
||||
<style type="text/css" id="style.css-56">
|
||||
.my-class-add, .my-class-remove {
|
||||
-webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
|
||||
-moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
|
||||
|
@ -128,8 +128,8 @@ element.</p>
|
|||
</style>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-26"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-26">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-57"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-57">
|
||||
it('should check ng-class', function() {
|
||||
expect(element('.doc-example-live span').prop('className')).not().
|
||||
toMatch(/my-class/);
|
||||
|
@ -146,7 +146,13 @@ element.</p>
|
|||
});
|
||||
</script>
|
||||
</div>
|
||||
</div><div class="pull-right"> <button class="btn btn-primary" ng-click="animationsOff=true" ng-hide="animationsOff">Animations on</button> <button class="btn btn-primary disabled" ng-click="animationsOff=false" ng-show="animationsOff">Animations off</button></div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-class="{'animations-off':animationsOff == true}" ng-embed-app="" ng-set-html="index.html-24" ng-eval-javascript=""></div>
|
||||
</div><div class="pull-right"> <button class="btn btn-primary" ng-click="animationsOff=true" ng-hide="animationsOff">Animations on</button> <button class="btn btn-primary disabled" ng-click="animationsOff=false" ng-show="animationsOff">Animations off</button></div><h2>Demo</h2>
|
||||
<div class="well doc-example-live animate-container" ng-class="{'animations-off':animationsOff == true}" ng-embed-app="" ng-set-html="index.html-55" ng-eval-javascript=""></div>
|
||||
<h2>ngClass and pre-existing CSS3 Transitions/Animations</h4>
|
||||
<p>The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.
|
||||
Therefore, if any CSS3 Transition/Animation styles (outside of ngAnimate) are set on the element, then, if a ngClass animation
|
||||
is triggered, the ngClass animation will be skipped so that ngAnimate can allow for the pre-existing transition or animation to
|
||||
take over. This restriction allows for ngClass to still work with standard CSS3 Transitions/Animations that are defined
|
||||
outside of ngAnimate.</p>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ng/directive/ngClass.js#L249" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ng/directive/ngClass.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngClassEven</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ng/directive/ngClass.js#L257" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ng/directive/ngClass.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngClassEven</code>
|
||||
<div><span class="hint">directive in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -22,10 +22,10 @@ result of the evaluation can be a string representing space delimited class name
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-ngclasseven-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-30" source-edit-css="style.css-31" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-32"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-61" source-edit-css="style.css-62" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-63"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-30" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-30">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-61" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-61">
|
||||
<ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
|
||||
<li ng-repeat="name in names">
|
||||
<span ng-class-odd="'odd'" ng-class-even="'even'">
|
||||
|
@ -36,8 +36,8 @@ result of the evaluation can be a string representing space delimited class name
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="style.css">
|
||||
<pre class="prettyprint linenums" ng-set-text="style.css-31"></pre>
|
||||
<style type="text/css" id="style.css-31">
|
||||
<pre class="prettyprint linenums" ng-set-text="style.css-62"></pre>
|
||||
<style type="text/css" id="style.css-62">
|
||||
.odd {
|
||||
color: red;
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ result of the evaluation can be a string representing space delimited class name
|
|||
</style>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-32"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-32">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-63"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-63">
|
||||
it('should check ng-class-odd and ng-class-even', function() {
|
||||
expect(element('.doc-example-live li:first span').prop('className')).
|
||||
toMatch(/odd/);
|
||||
|
@ -58,6 +58,6 @@ result of the evaluation can be a string representing space delimited class name
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-30" ng-eval-javascript=""></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-61" ng-eval-javascript=""></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ng/directive/ngClass.js#L202" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ng/directive/ngClass.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngClassOdd</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ng/directive/ngClass.js#L210" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ng/directive/ngClass.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngClassOdd</code>
|
||||
<div><span class="hint">directive in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -22,10 +22,10 @@ of the evaluation can be a string representing space delimited class names or an
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-ngclassodd-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-27" source-edit-css="style.css-28" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-29"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-58" source-edit-css="style.css-59" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-60"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-27" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-27">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-58" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-58">
|
||||
<ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
|
||||
<li ng-repeat="name in names">
|
||||
<span ng-class-odd="'odd'" ng-class-even="'even'">
|
||||
|
@ -36,8 +36,8 @@ of the evaluation can be a string representing space delimited class names or an
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="style.css">
|
||||
<pre class="prettyprint linenums" ng-set-text="style.css-28"></pre>
|
||||
<style type="text/css" id="style.css-28">
|
||||
<pre class="prettyprint linenums" ng-set-text="style.css-59"></pre>
|
||||
<style type="text/css" id="style.css-59">
|
||||
.odd {
|
||||
color: red;
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ of the evaluation can be a string representing space delimited class names or an
|
|||
</style>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-29"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-29">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-60"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-60">
|
||||
it('should check ng-class-odd and ng-class-even', function() {
|
||||
expect(element('.doc-example-live li:first span').prop('className')).
|
||||
toMatch(/odd/);
|
||||
|
@ -58,6 +58,6 @@ of the evaluation can be a string representing space delimited class names or an
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-27" ng-eval-javascript=""></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-58" ng-eval-javascript=""></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -37,17 +37,17 @@ as class<pre class="prettyprint linenums"><ANY class="ng-cloak">
|
|||
</div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-ngcloak-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-33" source-edit-css="" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-34"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-64" source-edit-css="" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-65"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-33" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-33">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-64" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-64">
|
||||
<div id="template1" ng-cloak>{{ 'hello' }}</div>
|
||||
<div id="template2" ng-cloak class="ng-cloak">{{ 'hello IE7' }}</div>
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-34"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-34">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-65"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-65">
|
||||
it('should remove the template directive and css class', function() {
|
||||
expect(element('.doc-example-live #template1').attr('ng-cloak')).
|
||||
not().toBeDefined();
|
||||
|
@ -57,6 +57,6 @@ as class<pre class="prettyprint linenums"><ANY class="ng-cloak">
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-33" ng-eval-javascript=""></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-64" ng-eval-javascript=""></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -18,10 +18,10 @@ specified in form <code>/something/</code> then the value will be converted into
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ng-directive-page ng-directive-nglist-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-64" source-edit-css="" source-edit-js="script.js-63" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-65"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-50" source-edit-css="" source-edit-js="script.js-49" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-51"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-64" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-64">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-50" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-50">
|
||||
|
||||
<form name="myForm" ng-controller="Ctrl">
|
||||
List: <input name="namesInput" ng-model="names" ng-list required>
|
||||
|
@ -37,16 +37,16 @@ specified in form <code>/something/</code> then the value will be converted into
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-63"></pre>
|
||||
<script type="text/ng-template" id="script.js-63">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-49"></pre>
|
||||
<script type="text/ng-template" id="script.js-49">
|
||||
function Ctrl($scope) {
|
||||
$scope.names = ['igor', 'misko', 'vojta'];
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-65"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-65">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-51"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-51">
|
||||
it('should initialize to model', function() {
|
||||
expect(binding('names')).toEqual('["igor","misko","vojta"]');
|
||||
expect(binding('myForm.namesInput.$valid')).toEqual('true');
|
||||
|
@ -62,6 +62,6 @@ specified in form <code>/something/</code> then the value will be converted into
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-64" ng-eval-javascript="script.js-63"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-50" ng-eval-javascript="script.js-49"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -16,10 +16,10 @@ propogated to the parent scope.</p>
|
|||
data-binding. Notice how different directives (<code>contenteditable</code>, <code>ng-model</code>, and <code>required</code>)
|
||||
collaborate together to achieve the desired result.</p>
|
||||
<h4>Source</h2>
|
||||
<div source-edit="customControl" source-edit-deps="angular.js script.js" source-edit-html="index.html-58" source-edit-css="style.css-56" source-edit-js="script.js-57" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-59"></div>
|
||||
<div source-edit="customControl" source-edit-deps="angular.js script.js" source-edit-html="index.html-44" source-edit-css="style.css" source-edit-js="script.js-43" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-45"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-58" ng-html-wrap="customControl angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-58">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-44" ng-html-wrap="customControl angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-44">
|
||||
<form name="myForm">
|
||||
<div contenteditable
|
||||
name="myWidget" ng-model="userContent"
|
||||
|
@ -32,8 +32,8 @@ collaborate together to achieve the desired result.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="style.css">
|
||||
<pre class="prettyprint linenums" ng-set-text="style.css-56"></pre>
|
||||
<style type="text/css" id="style.css-56">
|
||||
<pre class="prettyprint linenums" ng-set-text="style.css"></pre>
|
||||
<style type="text/css" id="style.css">
|
||||
[contenteditable] {
|
||||
border: 1px solid black;
|
||||
background-color: white;
|
||||
|
@ -47,8 +47,8 @@ collaborate together to achieve the desired result.</p>
|
|||
</style>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-57"></pre>
|
||||
<script type="text/ng-template" id="script.js-57">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-43"></pre>
|
||||
<script type="text/ng-template" id="script.js-43">
|
||||
angular.module('customControl', []).
|
||||
directive('contenteditable', function() {
|
||||
return {
|
||||
|
@ -84,8 +84,8 @@ collaborate together to achieve the desired result.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-59"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-59">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-45"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-45">
|
||||
it('should data-bind and become invalid', function() {
|
||||
var contentEditable = element('[contenteditable]');
|
||||
|
||||
|
@ -97,7 +97,7 @@ collaborate together to achieve the desired result.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="customControl" ng-set-html="index.html-58" ng-eval-javascript="script.js-57"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="customControl" ng-set-html="index.html-44" ng-eval-javascript="script.js-43"></div>
|
||||
</div></div>
|
||||
<div class="member method"><h2 id="Methods">Methods</h2>
|
||||
<ul class="methods"><li><h3 id="$render">$render()</h3>
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
</div>
|
||||
</h1>
|
||||
<div><h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ng-directive-page ng-directive-ngtransclude-page"><p>Insert the transcluded DOM here.</p>
|
||||
<div class="description"><div class="ng-directive-page ng-directive-ngtransclude-page"><p>Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.</p>
|
||||
<p>Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.</p>
|
||||
</div></div>
|
||||
<h2 id="Usage">Usage</h2>
|
||||
<div class="usage">as attribute<pre class="prettyprint linenums"><ANY ng-transclude>
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
<div><span class="hint"></span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><div class="ng-page"><p>The <code>ng</code> is an angular module which contains all of the core angular services.</p>
|
||||
<div><div class="ng-page"><p><code>ng</code> is the name of the <a href="../../../../../index.htmlle">angular module</a> that contains all of the core angular services.</p>
|
||||
</div></div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngAnimate/animate.js#L236" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngAnimate/animate.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$animate</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngAnimate/animate.js#L233" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngAnimate/animate.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$animate</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ngAnimate</code>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -10,7 +10,8 @@ will examine any JavaScript-defined animations (which are defined by using the $
|
|||
as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run.</p>
|
||||
<p>The <code>$animate</code> service is used behind the scenes with pre-existing directives and animation with these directives
|
||||
will work out of the box without any extra configuration.</p>
|
||||
<p>Please visit the <a href="api/ngAnimate">ngAnimate</a> module overview page learn more about how to use animations in your application.</p>
|
||||
<p>Requires the <a href="api/ngAnimate"><code>ngAnimate</code></a> module to be installed.</p>
|
||||
<p>Please visit the <a href="api/ngAnimate"><code>ngAnimate</code></a> module overview page learn more about how to use animations in your application.</p>
|
||||
</div></div>
|
||||
<h2 id="Dependencies">Dependencies</h2>
|
||||
<ul class="dependencies"><li><code ng:non-bindable=""><a href="api/ng.$timeout,">$timeout,</a></code>
|
||||
|
@ -21,7 +22,8 @@ will work out of the box without any extra configuration.</p>
|
|||
<ul class="methods"><li><h3 id="addClass">addClass(element, className, done)</h3>
|
||||
<div class="addclass"><div class="nganimate-animate-addclass-page"><p>Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class.
|
||||
Unlike the other animation methods, the animate service will suffix the className value with <a href="#" class="label type-hint type-hint--add">-add</a> in order to provide
|
||||
the animate service the setup and active CSS classes in order to trigger the animation.</p>
|
||||
the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions
|
||||
or keyframes are defined on the -add CSS class).</p>
|
||||
<p>Below is a breakdown of each step that occurs during addClass animation:</p>
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -36,11 +38,11 @@ the animate service the setup and active CSS classes in order to trigger the ani
|
|||
<td>class=""</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2. the .super-add class is added to the element</td>
|
||||
<td>class="super-add"</td>
|
||||
<td>2. $animate runs any JavaScript-defined animations on the element</td>
|
||||
<td>class=""</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3. $animate runs any JavaScript-defined animations on the element</td>
|
||||
<td>3. the .super-add class is added to the element</td>
|
||||
<td>class="super-add"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -101,11 +103,11 @@ the animation is started, the following CSS classes will be present on the eleme
|
|||
<td>class="my-animation"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3. the .ng-enter class is added to the element</td>
|
||||
<td>class="my-animation ng-enter"</td>
|
||||
<td>3. $animate runs any JavaScript-defined animations on the element</td>
|
||||
<td>class="my-animation"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4. $animate runs any JavaScript-defined animations on the element</td>
|
||||
<td>4. the .ng-enter class is added to the element</td>
|
||||
<td>class="my-animation ng-enter"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -153,11 +155,11 @@ the animation is started, the following CSS classes will be added for the durati
|
|||
<td>class="my-animation"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2. the .ng-leave class is added to the element</td>
|
||||
<td>class="my-animation ng-leave"</td>
|
||||
<td>2. $animate runs any JavaScript-defined animations on the element</td>
|
||||
<td>class="my-animation"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3. $animate runs any JavaScript-defined animations on the element</td>
|
||||
<td>3. the .ng-leave class is added to the element</td>
|
||||
<td>class="my-animation ng-leave"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -212,11 +214,11 @@ the animation is started, the following CSS classes will be added for the durati
|
|||
<td>class="my-animation"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3. the .ng-move class is added to the element</td>
|
||||
<td>class="my-animation ng-move"</td>
|
||||
<td>3. $animate runs any JavaScript-defined animations on the element</td>
|
||||
<td>class="my-animation"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4. $animate runs any JavaScript-defined animations on the element</td>
|
||||
<td>4. the .ng-move class is added to the element</td>
|
||||
<td>class="my-animation ng-move"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -250,7 +252,8 @@ the animation is started, the following CSS classes will be added for the durati
|
|||
<li><h3 id="removeClass">removeClass(element, className, done)</h3>
|
||||
<div class="removeclass"><div class="nganimate-animate-removeclass-page"><p>Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value
|
||||
from the element. Unlike the other animation methods, the animate service will suffix the className value with <a href="#" class="label type-hint type-hint--remove">-remove</a> in
|
||||
order to provide the animate service the setup and active CSS classes in order to trigger the animation.</p>
|
||||
order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if
|
||||
no CSS transitions or keyframes are defined on the -remove CSS class).</p>
|
||||
<p>Below is a breakdown of each step that occurs during removeClass animation:</p>
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -265,11 +268,11 @@ order to provide the animate service the setup and active CSS classes in order t
|
|||
<td>class="super"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2. the .super-remove class is added to the element</td>
|
||||
<td>class="super super-remove"</td>
|
||||
<td>2. $animate runs any JavaScript-defined animations on the element</td>
|
||||
<td>class="super"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3. $animate runs any JavaScript-defined animations on the element</td>
|
||||
<td>3. the .super-remove class is added to the element</td>
|
||||
<td>class="super super-remove"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngAnimate/animate.js#L188" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngAnimate/animate.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$animateProvider</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngAnimate/animate.js#L183" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngAnimate/animate.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$animateProvider</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ngAnimate</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="nganimate-animateprovider-page"><p>The $AnimationProvider provider allows developers to register and access custom JavaScript animations directly inside
|
||||
<div class="description"><div class="nganimate-animateprovider-page"><p>The <code>$AnimationProvider</code> allows developers to register and access custom JavaScript animations directly inside
|
||||
of a module. When an animation is triggered, the $animate service will query the $animation function to find any
|
||||
animations that match the provided name value.</p>
|
||||
<p>Please visit the <a href="api/ngAnimate">ngAnimate</a> module overview page learn more about how to use animations in your application.</p>
|
||||
<p>Requires the <a href="api/ngAnimate"><code>ngAnimate</code></a> module to be installed.</p>
|
||||
<p>Please visit the <a href="api/ngAnimate"><code>ngAnimate</code></a> module overview page learn more about how to use animations in your application.</p>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -2,15 +2,12 @@
|
|||
<div><span class="hint"></span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><div class="nganimate-page"><h2>ngAnimate</h2>
|
||||
<p>The ngAnimate module is an optional module that comes packed with AngularJS that can be included within an AngularJS
|
||||
application to provide support for CSS and JavaScript animation hooks.</p>
|
||||
<p>To make use of animations with AngularJS, the <code>angular-animate.js</code> JavaScript file must be included into your application
|
||||
and the <code>ngAnimate</code> module must be included as a dependency.</p>
|
||||
<pre class="prettyprint linenums">
|
||||
angular.module('App', ['ngAnimate']);
|
||||
</pre>
|
||||
<p>Then, to see animations in action, all that is required is to define the appropriate CSS classes
|
||||
<div><div class="nganimate-page"><h2>ngAnimate</h1>
|
||||
<p><code>ngAnimate</code> is an optional module that provides CSS and JavaScript animation hooks.</p>
|
||||
<p><h1>Installation</h1><p>First include <code>angular-animate.js</code> in your HTML:</p><pre><code> <script src="angular.js">
|
||||
<script src="angular-animate.js"></pre></code><p>You can also find this file on the <a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a>, <a href="http://bower.io/">Bower</a> (as <code>angular-animate</code>), and on <a href="http://code.angularjs.org/">code.angularjs.org</a>.</p><p>Then load the module in your application by adding it as a dependant module:</p><pre><code> angular.module('app', ['ngAnimate']);</pre></code><p>With that you're ready to get started!</p></p>
|
||||
<h1>Usage</h2>
|
||||
<p>To see animations in action, all that is required is to define the appropriate CSS classes
|
||||
or to register a JavaScript animation via the $animation service. The directives that support animation automatically are:
|
||||
<code>ngRepeat</code>, <code>ngInclude</code>, <code>ngSwitch</code>, <code>ngShow</code>, <code>ngHide</code> and <code>ngView</code>. Custom directives can take advantage of animation
|
||||
by using the <code>$animate</code> service.</p>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngCookies/cookies.js#L116" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngCookies/cookies.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$cookieStore</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngCookies/cookies.js#L129" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngCookies/cookies.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$cookieStore</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ngCookies</code>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -7,6 +7,7 @@
|
|||
<div class="description"><div class="ngcookies-cookiestore-page"><p>Provides a key-value (string-object) storage, that is backed by session cookies.
|
||||
Objects put or retrieved from this storage are automatically serialized or
|
||||
deserialized by angular's toJson/fromJson.</p>
|
||||
<p>Requires the <a href="api/ngCookies"><code>ngCookies</code></a> module to be installed.</p>
|
||||
</div></div>
|
||||
<h2 id="Dependencies">Dependencies</h2>
|
||||
<ul class="dependencies"><li><code ng:non-bindable=""><a href="api/ng.$cookies">$cookies</a></code>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngCookies/cookies.js#L10" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngCookies/cookies.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$cookies</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngCookies/cookies.js#L21" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngCookies/cookies.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$cookies</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ngCookies</code>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -7,6 +7,7 @@
|
|||
<div class="description"><div class="ngcookies-cookies-page"><p>Provides read/write access to browser's cookies.</p>
|
||||
<p>Only a simple Object is exposed and by adding or removing properties to/from
|
||||
this object, new cookies are created/deleted at the end of current $eval.</p>
|
||||
<p>Requires the <a href="api/ngCookies"><code>ngCookies</code></a> module to be installed.</p>
|
||||
</div></div>
|
||||
<h2 id="Dependencies">Dependencies</h2>
|
||||
<ul class="dependencies"><li><code ng:non-bindable=""><a href="api/ng.$browser">$browser</a></code>
|
||||
|
@ -14,16 +15,16 @@ this object, new cookies are created/deleted at the end of current $eval.</p>
|
|||
</ul>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ngcookies-cookies-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-140" source-edit-css="" source-edit-js="script.js-139" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-141" source-edit-css="" source-edit-js="script.js-140" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-140" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-140">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-141" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-141">
|
||||
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-139"></pre>
|
||||
<script type="text/ng-template" id="script.js-139">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-140"></pre>
|
||||
<script type="text/ng-template" id="script.js-140">
|
||||
function ExampleController($cookies) {
|
||||
// Retrieving a cookie
|
||||
var favoriteCookie = $cookies.myFavorite;
|
||||
|
@ -33,6 +34,6 @@ this object, new cookies are created/deleted at the end of current $eval.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-140" ng-eval-javascript="script.js-139"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-141" ng-eval-javascript="script.js-140"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -2,4 +2,11 @@
|
|||
<div><span class="hint"></span>
|
||||
</div>
|
||||
</h1>
|
||||
<div></div>
|
||||
<div><div class="ngcookies-page"><h2>ngCookies</h1>
|
||||
<p>Provides the <a href="api/ngCookies.$cookies"><code>$cookies</code></a> and
|
||||
<a href="api/ngCookies.$cookieStore"><code>$cookieStore</code></a> services.</p>
|
||||
<p><h1>Installation</h2><p>First include <code>angular-cookies.js</code> in your HTML:</p><pre><code> <script src="angular.js">
|
||||
<script src="angular-cookies.js"></pre></code><p>You can also find this file on the <a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a>, <a href="http://bower.io/">Bower</a> (as <code>angular-cookies</code>), and on <a href="http://code.angularjs.org/">code.angularjs.org</a>.</p><p>Then load the module in your application by adding it as a dependant module:</p><pre><code> angular.module('app', ['ngCookies']);</pre></code><p>With that you're ready to get started!</p></p>
|
||||
<p>See <a href="api/ngCookies.$cookies"><code>$cookies</code></a> and
|
||||
<a href="api/ngCookies.$cookieStore"><code>$cookieStore</code></a> for usage.</p>
|
||||
</div></div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngResource/resource.js#L11" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngResource/resource.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$resource</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngResource/resource.js#L21" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngResource/resource.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$resource</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ngResource</code>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -8,13 +8,7 @@
|
|||
<a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">RESTful</a> server-side data sources.</p>
|
||||
<p>The returned resource object has action methods which provide high-level behaviors without
|
||||
the need to interact with the low level <a href="api/ng.$http"><code>$http</code></a> service.</p>
|
||||
<h3>Installation</h3>
|
||||
<p>To use $resource make sure you have included the <code>angular-resource.js</code> that comes in Angular
|
||||
package. You can also find this file on Google CDN, bower as well as at
|
||||
<a href="http://code.angularjs.org/">code.angularjs.org</a>.</p>
|
||||
<p>Finally load the module in your application:</p>
|
||||
<pre><code> angular.module('app', ['ngResource']);</code></pre>
|
||||
<p>and you are ready to get started!</p>
|
||||
<p>Requires the <a href="api/ngResource"><code>ngResource</code></a> module to be installed.</p>
|
||||
</div></div>
|
||||
<h2 id="Dependencies">Dependencies</h2>
|
||||
<ul class="dependencies"><li><code ng:non-bindable=""><a href="api/ng.$http">$http</a></code>
|
||||
|
@ -26,8 +20,8 @@ package. You can also find this file on Google CDN, bower as well as at
|
|||
<code>/user/:username</code>. If you are using a URL with a port number (e.g.
|
||||
<code>http://example.com:8080/api</code>), it will be respected.</p>
|
||||
<p>If you are using a url with a suffix, just add the suffix, like this:
|
||||
<code>$resource('http://example.com/resource.json')</code> or <code>$resource('http://example.com/:id.json')
|
||||
or even</code>$resource('<a href="http://example.com/resource/:resource_id.:format')`">http://example.com/resource/:resource_id.:format')`</a>
|
||||
<code>$resource('http://example.com/resource.json')</code> or <code>$resource('http://example.com/:id.json')</code>
|
||||
or even <code>$resource('http://example.com/resource/:resource_id.:format')</code>
|
||||
If the parameter before the suffix is empty, :resource_id in this case, then the <code>/.</code> will be
|
||||
collapsed down to a single <code>.</code>. If you need this sequence to appear and not collapse then you
|
||||
can escape it with <code>/\.</code>.</p>
|
||||
|
@ -195,10 +189,10 @@ could rewrite the above example and get access to http headers as:</p>
|
|||
<h1>Buzz client</h1>
|
||||
<p> Let's look at what a buzz client created with the <code>$resource</code> service looks like:
|
||||
<h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-145" source-edit-css="" source-edit-js="script.js-144" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-146"></div>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-143" source-edit-css="" source-edit-js="script.js-142" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-144"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-145" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-145">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-143" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-143">
|
||||
|
||||
|
||||
<div ng-controller="BuzzController">
|
||||
|
@ -221,8 +215,8 @@ could rewrite the above example and get access to http headers as:</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-144"></pre>
|
||||
<script type="text/ng-template" id="script.js-144">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-142"></pre>
|
||||
<script type="text/ng-template" id="script.js-142">
|
||||
function BuzzController($resource) {
|
||||
this.userId = 'googlebuzz';
|
||||
this.Activity = $resource(
|
||||
|
@ -244,11 +238,11 @@ could rewrite the above example and get access to http headers as:</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-146"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-146">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-144"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-144">
|
||||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-145" ng-eval-javascript="script.js-144"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-143" ng-eval-javascript="script.js-142"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -2,4 +2,11 @@
|
|||
<div><span class="hint"></span>
|
||||
</div>
|
||||
</h1>
|
||||
<div></div>
|
||||
<div><div class="ngresource-page"><h2>ngResource</h1>
|
||||
<p><code>ngResource</code> is the name of the optional Angular module that adds support for interacting with
|
||||
<a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">RESTful</a> server-side data sources.
|
||||
<code>ngReource</code> provides the <a href="api/ngResource.$resource"><code>$resource</code></a> serivce.</p>
|
||||
<p><h1>Installation</h2><p>First include <code>angular-resource.js</code> in your HTML:</p><pre><code> <script src="angular.js">
|
||||
<script src="angular-resource.js"></pre></code><p>You can also find this file on the <a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a>, <a href="http://bower.io/">Bower</a> (as <code>angular-resource</code>), and on <a href="http://code.angularjs.org/">code.angularjs.org</a>.</p><p>Then load the module in your application by adding it as a dependant module:</p><pre><code> angular.module('app', ['ngResource']);</pre></code><p>With that you're ready to get started!</p></p>
|
||||
<p>See <a href="api/ngResource.$resource"><code>$resource</code></a> for usage.</p>
|
||||
</div></div>
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngRoute/route.js#L203" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngRoute/route.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$route</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngRoute/route.js#L210" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngRoute/route.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$route</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ngRoute</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngroute-route-page"><p>Is used for deep-linking URLs to controllers and views (HTML partials).
|
||||
<div class="description"><div class="ngroute-route-page"><p><code>$route</code> is used for deep-linking URLs to controllers and views (HTML partials).
|
||||
It watches <code>$location.url()</code> and tries to map the path to an existing route definition.</p>
|
||||
<p>Requires the <a href="api/ngRoute"><code>ngRoute</code></a> module to be installed.</p>
|
||||
<p>You can define routes through <a href="api/ngRoute.$routeProvider">$routeProvider</a>'s API.</p>
|
||||
<p>The <code>$route</code> service is typically used in conjunction with <a href="api/ngRoute.directive:ngView">ngView</a>
|
||||
directive and the <a href="api/ngRoute.$routeParams">$routeParams</a> service.</p>
|
||||
<p>The <code>$route</code> service is typically used in conjunction with the <a href="api/ngRoute.directive:ngView"><code>ngView</code></a>
|
||||
directive and the <a href="api/ngRoute.$routeParams"><code>$routeParams</code></a> service.</p>
|
||||
</div></div>
|
||||
<h2 id="Dependencies">Dependencies</h2>
|
||||
<ul class="dependencies"><li><code ng:non-bindable=""><a href="api/ng.$location">$location</a></code>
|
||||
|
@ -113,10 +114,10 @@ URL, and the <code>ngView</code> pulls in the partial.</p>
|
|||
<p>Note that this example is using <a href="api/ng.directive:script"><code>inlined templates</code></a>
|
||||
to get it working on jsfiddle as well.</p>
|
||||
<h4>Source</h2>
|
||||
<div source-edit="ngView" source-edit-deps="angular.js angular-route.js script.js" source-edit-html="index.html-153 book.html chapter.html" source-edit-css="" source-edit-js="script.js-154" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-155"></div>
|
||||
<div source-edit="ngView" source-edit-deps="angular.js angular-route.js script.js" source-edit-html="index.html-148 book.html chapter.html" source-edit-css="" source-edit-js="script.js-149" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-150"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-153" ng-html-wrap="ngView angular.js angular-route.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-153">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-148" ng-html-wrap="ngView angular.js angular-route.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-148">
|
||||
<div ng-controller="MainCntl">
|
||||
Choose:
|
||||
<a href="Book/Moby">Moby</a> |
|
||||
|
@ -152,8 +153,8 @@ to get it working on jsfiddle as well.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-154"></pre>
|
||||
<script type="text/ng-template" id="script.js-154">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-149"></pre>
|
||||
<script type="text/ng-template" id="script.js-149">
|
||||
angular.module('ngView', ['ngRoute']).config(function($routeProvider, $locationProvider) {
|
||||
$routeProvider.when('/Book/:bookId', {
|
||||
templateUrl: 'book.html',
|
||||
|
@ -194,8 +195,8 @@ to get it working on jsfiddle as well.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-155"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-155">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-150"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-150">
|
||||
it('should load and compile correct template', function() {
|
||||
element('a:contains("Moby: Ch1")').click();
|
||||
var content = element('.doc-example-live [ng-view]').text();
|
||||
|
@ -212,6 +213,6 @@ to get it working on jsfiddle as well.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="ngView" ng-set-html="index.html-153" ng-eval-javascript="script.js-154"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="ngView" ng-set-html="index.html-148" ng-eval-javascript="script.js-149"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
</div>
|
||||
</h1>
|
||||
<div><h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngroute-routeparams-page"><p>Current set of route parameters. The route parameters are a combination of the
|
||||
<a href="api/ng.$location"><code>$location</code></a> <code>search()</code>, and <code>path()</code>. The <code>path</code> parameters
|
||||
are extracted when the <a href="api/ngRoute.$route">$route</a> path is matched.</p>
|
||||
<div class="description"><div class="ngroute-routeparams-page"><p>The <code>$routeParams</code> service allows you to retrieve the current set of route parameters.</p>
|
||||
<p>Requires the <a href="api/ngRoute"><code>ngRoute</code></a> module to be installed.</p>
|
||||
<p>The route parameters are a combination of <a href="api/ng.$location"><code><code>$location</code></code></a>'s
|
||||
<a href="api/ng.$location#search"><code><code>search()</code></code></a> and <a href="api/ng.$location#path"><code><code>path()</code></code></a>.
|
||||
The <code>path</code> parameters are extracted when the <a href="api/ngRoute.$route"><code>$route</code></a> path is matched.</p>
|
||||
<p>In case of parameter name collision, <code>path</code> params take precedence over <code>search</code> params.</p>
|
||||
<p>The service guarantees that the identity of the <code>$routeParams</code> object will remain unchanged
|
||||
(but its properties will likely change) even when a route change occurs.</p>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngRoute/route.js#L14" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngRoute/route.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$routeProvider</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngRoute/route.js#L19" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngRoute/route.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$routeProvider</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ngRoute</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngroute-routeprovider-page"><p>Used for configuring routes. See <a href="api/ngRoute.$route">$route</a> for an example.</p>
|
||||
<p>Requires the <a href="api/ngRoute"><code>ngRoute</code></a> module to be installed.</p>
|
||||
</div></div>
|
||||
<div class="member method"><h2 id="Methods">Methods</h2>
|
||||
<ul class="methods"><li><h3 id="otherwise">otherwise(params)</h3>
|
||||
|
@ -24,8 +25,8 @@ route definition.</p>
|
|||
<li><code>path</code> can contain named groups starting with a colon (<code>:name</code>). All characters up
|
||||
to the next slash are matched and stored in <code>$routeParams</code> under the given <code>name</code>
|
||||
when the route matches.</li>
|
||||
<li><code>path</code> can contain named groups starting with a colon and ending with a star (<code>:name*</code>).
|
||||
All characters are eagerly stored in <code>$routeParams</code> under the given <code>name</code>
|
||||
<li><code>path</code> can contain named groups starting with a colon and ending with a star (<code>:name*</code>).
|
||||
All characters are eagerly stored in <code>$routeParams</code> under the given <code>name</code>
|
||||
when the route matches.</li>
|
||||
<li><code>path</code> can contain optional named groups with a question mark (<code>:name?</code>).</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngRoute/directive/ngView.js#L3" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngRoute/directive/ngView.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngView</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngRoute/directive/ngView.js#L5" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngRoute/directive/ngView.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngView</code>
|
||||
<div><span class="hint">directive in module <code ng:non-bindable="">ngRoute</code>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -9,6 +9,7 @@
|
|||
including the rendered template of the current route into the main layout (<code>index.html</code>) file.
|
||||
Every time the current route changes, the included view changes with it according to the
|
||||
configuration of the <code>$route</code> service.</p>
|
||||
<p>Requires the <a href="api/ngRoute"><code>ngRoute</code></a> module to be installed.</p>
|
||||
</div></div>
|
||||
<h2 id="Usage">Usage</h2>
|
||||
<div class="usage"><p>This directive can be used as custom element, but be aware of <a href="guide/ie">IE restrictions</a>.</p>as element:<pre class="prettyprint linenums"><ng-view>
|
||||
|
@ -41,10 +42,10 @@ as class<pre class="prettyprint linenums"><ANY class="ng-view">
|
|||
</div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ngroute-directive-page ngroute-directive-ngview-page"><h4>Source</h2>
|
||||
<div source-edit="ngViewExample" source-edit-deps="angular.js angular-animate.js angular-route.js script.js" source-edit-html="index.html-141 book.html chapter.html" source-edit-css="animations.css" source-edit-js="script.js-142" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-143"></div>
|
||||
<div source-edit="ngViewExample" source-edit-deps="angular.js angular-animate.js angular-route.js script.js" source-edit-html="index.html-145 book.html chapter.html" source-edit-css="animations.css" source-edit-js="script.js-146" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-147"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-141" ng-html-wrap="ngViewExample angular.js angular-animate.js angular-route.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-141">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-145" ng-html-wrap="ngViewExample angular.js angular-animate.js angular-route.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-145">
|
||||
<div ng-controller="MainCntl as main">
|
||||
Choose:
|
||||
<a href="Book/Moby">Moby</a> |
|
||||
|
@ -137,8 +138,8 @@ as class<pre class="prettyprint linenums"><ANY class="ng-view">
|
|||
</style>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-142"></pre>
|
||||
<script type="text/ng-template" id="script.js-142">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-146"></pre>
|
||||
<script type="text/ng-template" id="script.js-146">
|
||||
angular.module('ngViewExample', ['ngRoute', 'ngAnimate'], function($routeProvider, $locationProvider) {
|
||||
$routeProvider.when('/Book/:bookId', {
|
||||
templateUrl: 'book.html',
|
||||
|
@ -173,8 +174,8 @@ as class<pre class="prettyprint linenums"><ANY class="ng-view">
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-143"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-143">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-147"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-147">
|
||||
it('should load and compile correct template', function() {
|
||||
element('a:contains("Moby: Ch1")').click();
|
||||
var content = element('.doc-example-live [ng-view]').text();
|
||||
|
@ -190,6 +191,6 @@ as class<pre class="prettyprint linenums"><ANY class="ng-view">
|
|||
</script>
|
||||
</div>
|
||||
</div><div class="pull-right"> <button class="btn btn-primary" ng-click="animationsOff=true" ng-hide="animationsOff">Animations on</button> <button class="btn btn-primary disabled" ng-click="animationsOff=false" ng-show="animationsOff">Animations off</button></div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-class="{'animations-off':animationsOff == true}" ng-embed-app="ngViewExample" ng-set-html="index.html-141" ng-eval-javascript="script.js-142"></div>
|
||||
<div class="well doc-example-live animate-container" ng-class="{'animations-off':animationsOff == true}" ng-embed-app="ngViewExample" ng-set-html="index.html-145" ng-eval-javascript="script.js-146"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -2,5 +2,8 @@
|
|||
<div><span class="hint"></span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><div class="ngroute-page"><p>Module that provides routing and deeplinking services and directives for angular apps.</p>
|
||||
<div><div class="ngroute-page"><h2>ngRoute</h1>
|
||||
<p>The <code>ngRoute</code> module provides routing and deeplinking services and directives for angular apps.</p>
|
||||
<p><h1>Installation</h2><p>First include <code>angular-route.js</code> in your HTML:</p><pre><code> <script src="angular.js">
|
||||
<script src="angular-route.js"></pre></code><p>You can also find this file on the <a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a>, <a href="http://bower.io/">Bower</a> (as <code>angular-route</code>), and on <a href="http://code.angularjs.org/">code.angularjs.org</a>.</p><p>Then load the module in your application by adding it as a dependant module:</p><pre><code> angular.module('app', ['ngRoute']);</pre></code><p>With that you're ready to get started!</p></p>
|
||||
</div></div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngSanitize/sanitize.js#L47" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngSanitize/sanitize.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$sanitize</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngSanitize/sanitize.js#L36" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngSanitize/sanitize.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$sanitize</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ngSanitize</code>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -17,10 +17,10 @@ browser, won't make it through the sanitizer.</p>
|
|||
</div></td></tr></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ngsanitize-sanitize-page"><h4>Source</h2>
|
||||
<div source-edit="ngSanitize" source-edit-deps="angular.js script.js" source-edit-html="index.html-151" source-edit-css="" source-edit-js="script.js-150" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-152"></div>
|
||||
<div source-edit="ngSanitize" source-edit-deps="angular.js script.js" source-edit-html="index.html-155" source-edit-css="" source-edit-js="script.js-154" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-156"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-151" ng-html-wrap="ngSanitize angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-151">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-155" ng-html-wrap="ngSanitize angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-155">
|
||||
|
||||
<div ng-controller="Ctrl">
|
||||
Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
|
||||
|
@ -54,8 +54,8 @@ browser, won't make it through the sanitizer.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-150"></pre>
|
||||
<script type="text/ng-template" id="script.js-150">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-154"></pre>
|
||||
<script type="text/ng-template" id="script.js-154">
|
||||
function Ctrl($scope, $sce) {
|
||||
$scope.snippet =
|
||||
'<p style="color:blue">an html\n' +
|
||||
|
@ -68,8 +68,8 @@ browser, won't make it through the sanitizer.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-152"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-152">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-156"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-156">
|
||||
it('should sanitize the html snippet by default', function() {
|
||||
expect(using('#bind-html-with-sanitize').element('div').html()).
|
||||
toBe('<p>an html\n<em>click here</em>\nsnippet</p>');
|
||||
|
@ -98,6 +98,6 @@ browser, won't make it through the sanitizer.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="ngSanitize" ng-set-html="index.html-151" ng-eval-javascript="script.js-150"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="ngSanitize" ng-set-html="index.html-155" ng-eval-javascript="script.js-154"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<div><h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngsanitize-filter-page ngsanitize-filter-linky-page"><p>Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and
|
||||
plain email address links.</p>
|
||||
<p>Requires the <a href="api/ngSanitize"><code>ngSanitize</code></a> module to be installed.</p>
|
||||
</div></div>
|
||||
<h2 id="Usage">Usage</h2>
|
||||
<div class="usage"><h3 id="In.HTML.Template.Binding">In HTML Template Binding</h3>
|
||||
|
@ -20,10 +21,10 @@ plain email address links.</p>
|
|||
</div></td></tr></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ngsanitize-filter-page ngsanitize-filter-linky-page"><h4>Source</h2>
|
||||
<div source-edit="ngSanitize" source-edit-deps="angular.js script.js" source-edit-html="index.html-148" source-edit-css="" source-edit-js="script.js-147" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-149"></div>
|
||||
<div source-edit="ngSanitize" source-edit-deps="angular.js script.js" source-edit-html="index.html-152" source-edit-css="" source-edit-js="script.js-151" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-153"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-148" ng-html-wrap="ngSanitize angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-148">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-152" ng-html-wrap="ngSanitize angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-152">
|
||||
|
||||
<div ng-controller="Ctrl">
|
||||
Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
|
||||
|
@ -60,8 +61,8 @@ plain email address links.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-147"></pre>
|
||||
<script type="text/ng-template" id="script.js-147">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-151"></pre>
|
||||
<script type="text/ng-template" id="script.js-151">
|
||||
function Ctrl($scope) {
|
||||
$scope.snippet =
|
||||
'Pretty text with some links:\n'+
|
||||
|
@ -74,8 +75,8 @@ plain email address links.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-149"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-149">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-153"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-153">
|
||||
it('should linkify the snippet with urls', function() {
|
||||
expect(using('#linky-filter').binding('snippet | linky')).
|
||||
toBe('Pretty text with some links: ' +
|
||||
|
@ -108,6 +109,6 @@ plain email address links.</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="ngSanitize" ng-set-html="index.html-148" ng-eval-javascript="script.js-147"></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="ngSanitize" ng-set-html="index.html-152" ng-eval-javascript="script.js-151"></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -2,18 +2,9 @@
|
|||
<div><span class="hint"></span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><div class="ngsanitize-page"><p>The <code>ngSanitize</code> module provides functionality to sanitize HTML.</p>
|
||||
<h2>Installation</h1>
|
||||
<p>As a separate module, it must be loaded after Angular core is loaded; otherwise, an 'Uncaught Error:
|
||||
No module: ngSanitize' runtime error will occur.</p>
|
||||
<pre class="prettyprint linenums">
|
||||
<script src="angular.js"></script>
|
||||
<script src="angular-sanitize.js"></script>
|
||||
</pre>
|
||||
<h1>Usage</h2>
|
||||
<p>To make sure the module is available to your application, declare it as a dependency of you application
|
||||
module.</p>
|
||||
<pre class="prettyprint linenums">
|
||||
angular.module('app', ['ngSanitize']);
|
||||
</pre>
|
||||
<div><div class="ngsanitize-page"><h2>ngSanitize</h1>
|
||||
<p>The <code>ngSanitize</code> module provides functionality to sanitize HTML.</p>
|
||||
<p><h1>Installation</h2><p>First include <code>angular-sanitize.js</code> in your HTML:</p><pre><code> <script src="angular.js">
|
||||
<script src="angular-sanitize.js"></pre></code><p>You can also find this file on the <a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a>, <a href="http://bower.io/">Bower</a> (as <code>angular-sanitize</code>), and on <a href="http://code.angularjs.org/">code.angularjs.org</a>.</p><p>Then load the module in your application by adding it as a dependant module:</p><pre><code> angular.module('app', ['ngSanitize']);</pre></code><p>With that you're ready to get started!</p></p>
|
||||
<p>See <a href="api/ngSanitize.$sanitize"><code>$sanitize</code></a> for usage.</p>
|
||||
</div></div>
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
<div><h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ngtouch-swipe-page"><p>The <code>$swipe</code> service is a service that abstracts the messier details of hold-and-drag swipe
|
||||
behavior, to make implementing swipe-related directives more convenient.</p>
|
||||
<p>It is used by the <code>ngSwipeLeft</code> and <code>ngSwipeRight</code> directives in <code>ngTouch</code>, and by
|
||||
<p>Requires the <a href="api/ngTouch"><code>ngTouch</code></a> module to be installed.</p>
|
||||
<p><code>$swipe</code> is used by the <code>ngSwipeLeft</code> and <code>ngSwipeRight</code> directives in <code>ngTouch</code>, and by
|
||||
<code>ngCarousel</code> in a separate component.</p>
|
||||
<h3>Usage</h3>
|
||||
<p>The <code>$swipe</code> service is an object with a single method: <code>bind</code>. <code>bind</code> takes an element
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
devices. Most mobile browsers wait about 300ms after a tap-and-release before sending
|
||||
the click event. This version handles them immediately, and then prevents the
|
||||
following click event from propagating.</p>
|
||||
<p>Requires the <a href="api/ngTouch"><code>ngTouch</code></a> module to be installed.</p>
|
||||
<p>This directive can fall back to using an ordinary click event, and so works on desktop
|
||||
browsers as well as mobile.</p>
|
||||
<p>This directive also sets the CSS class <code>ng-click-active</code> while the element is being held
|
||||
|
@ -25,10 +26,10 @@ upon tap. (Event object is available as <code>$event</code>)</p>
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ngtouch-directive-page ngtouch-directive-ngclick-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-158" source-edit-css="" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-159" source-edit-css="" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-158" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-158">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-159" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-159">
|
||||
<button ng-click="count = count + 1" ng-init="count=0">
|
||||
Increment
|
||||
</button>
|
||||
|
@ -36,6 +37,6 @@ upon tap. (Event object is available as <code>$event</code>)</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-158" ng-eval-javascript=""></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-159" ng-eval-javascript=""></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<div class="description"><div class="ngtouch-directive-page ngtouch-directive-ngswipeleft-page"><p>Specify custom behavior when an element is swiped to the left on a touchscreen device.
|
||||
A leftward swipe is a quick, right-to-left slide of the finger.
|
||||
Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag too.</p>
|
||||
<p>Requires the <a href="api/ngTouch"><code>ngTouch</code></a> module to be installed.</p>
|
||||
</div></div>
|
||||
<h2 id="Usage">Usage</h2>
|
||||
<div class="usage">as attribute<pre class="prettyprint linenums"><ANY ng-swipe-left="{expression}">
|
||||
|
@ -20,10 +21,10 @@ upon left swipe. (Event object is available as <code>$event</code>)</p>
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ngtouch-directive-page ngtouch-directive-ngswipeleft-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-156" source-edit-css="" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-157" source-edit-css="" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-156" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-156">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-157" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-157">
|
||||
<div ng-show="!showActions" ng-swipe-left="showActions = true">
|
||||
Some list content, like an email in the inbox
|
||||
</div>
|
||||
|
@ -34,6 +35,6 @@ upon left swipe. (Event object is available as <code>$event</code>)</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-156" ng-eval-javascript=""></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-157" ng-eval-javascript=""></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngTouch/directive/ngSwipe.js#L30" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngTouch/directive/ngSwipe.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngSwipeRight</code>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ngTouch/directive/ngSwipe.js#L32" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngTouch/directive/ngSwipe.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngSwipeRight</code>
|
||||
<div><span class="hint">directive in module <code ng:non-bindable="">ngTouch</code>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -7,6 +7,7 @@
|
|||
<div class="description"><div class="ngtouch-directive-page ngtouch-directive-ngswiperight-page"><p>Specify custom behavior when an element is swiped to the right on a touchscreen device.
|
||||
A rightward swipe is a quick, left-to-right slide of the finger.
|
||||
Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag too.</p>
|
||||
<p>Requires the <a href="api/ngTouch"><code>ngTouch</code></a> module to be installed.</p>
|
||||
</div></div>
|
||||
<h2 id="Usage">Usage</h2>
|
||||
<div class="usage">as attribute<pre class="prettyprint linenums"><ANY ng-swipe-right="{expression}">
|
||||
|
@ -20,10 +21,10 @@ upon right swipe. (Event object is available as <code>$event</code>)</p>
|
|||
</div></td></tr></tbody></table></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><div class="ngtouch-directive-page ngtouch-directive-ngswiperight-page"><h4>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-157" source-edit-css="" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-158" source-edit-css="" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-157" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-157">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-158" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-158">
|
||||
<div ng-show="!showActions" ng-swipe-left="showActions = true">
|
||||
Some list content, like an email in the inbox
|
||||
</div>
|
||||
|
@ -34,6 +35,6 @@ upon right swipe. (Event object is available as <code>$event</code>)</p>
|
|||
</script>
|
||||
</div>
|
||||
</div><h2>Demo</h4>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-157" ng-eval-javascript=""></div>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-158" ng-eval-javascript=""></div>
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
<div><span class="hint"></span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><div class="ngtouch-page"><p>Touch events and other mobile helpers.
|
||||
Based on jQuery Mobile touch event handling (jquerymobile.com)</p>
|
||||
<div><div class="ngtouch-page"><h2>ngTouch</h1>
|
||||
<p><code>ngTouch</code> is the name of the optional Angular module that provides touch events and other
|
||||
helpers for touch-enabled devices.
|
||||
The implementation is based on jQuery Mobile touch event handling
|
||||
(<a href="http://jquerymobile.com/">jquerymobile.com</a>)</p>
|
||||
<p><h1>Installation</h2><p>First include <code>angular-touch.js</code> in your HTML:</p><pre><code> <script src="angular.js">
|
||||
<script src="angular-touch.js"></pre></code><p>You can also find this file on the <a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a>, <a href="http://bower.io/">Bower</a> (as <code>angular-touch</code>), and on <a href="http://code.angularjs.org/">code.angularjs.org</a>.</p><p>Then load the module in your application by adding it as a dependant module:</p><pre><code> angular.module('app', ['ngTouch']);</pre></code><p>With that you're ready to get started!</p></p>
|
||||
<p>See <a href="../../../../../index.htmlh.$swipe"><code>$swipe</code></a> for usage.</p>
|
||||
</div></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue