Update Angular to 1.2.0 RC2

This commit is contained in:
Colin Frei 2013-09-22 11:10:37 +02:00
parent 7416269494
commit 0d3a40980e
184 changed files with 17993 additions and 21133 deletions

View file

@ -40,15 +40,15 @@ it with <a href="api/ng.$rootScope"><code>$rootScope</code></a></li>
<div class="clear">
</div>
<h3>Source</h2>
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-180" 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-181" 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-180" ng-html-wrap=" angular.js"></pre>
<script type="text/ng-template" id="index.html-180">
<pre class="prettyprint linenums" ng-set-text="index.html-181" ng-html-wrap=" angular.js"></pre>
<script type="text/ng-template" id="index.html-181">
<p ng-init=" name='World' ">Hello {{name}}!</p>
</script>
</div>
</div><h2>Demo</h2>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-180" ng-eval-javascript=""></div>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-181" ng-eval-javascript=""></div>
<a name="runtime"></a>
@ -116,16 +116,16 @@ user enters text into the text field.
<div class="clear">
</div>
<h2>Source</h2>
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-181" 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-182" 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-181" ng-html-wrap=" angular.js"></pre>
<script type="text/ng-template" id="index.html-181">
<pre class="prettyprint linenums" ng-set-text="index.html-182" ng-html-wrap=" angular.js"></pre>
<script type="text/ng-template" id="index.html-182">
<input ng-model="name">
<p>Hello {{name}}!</p>
</script>
</div>
</div><h2>Demo</h2>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-181" ng-eval-javascript=""></div>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-182" ng-eval-javascript=""></div>
<a name="scope"></a>
#Scope
@ -143,10 +143,10 @@ a diagram depicting the scope boundaries.
</div>
<div class="show-scope">
<h2>Source</h2>
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-182" source-edit-css="style.css-184" source-edit-js="script.js-183" 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-183" source-edit-css="style.css-185" source-edit-js="script.js-184" 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-182" ng-html-wrap=" angular.js script.js"></pre>
<script type="text/ng-template" id="index.html-182">
<pre class="prettyprint linenums" ng-set-text="index.html-183" ng-html-wrap=" angular.js script.js"></pre>
<script type="text/ng-template" id="index.html-183">
<div ng-controller="GreetCtrl">
Hello {{name}}!
</div>
@ -158,8 +158,8 @@ a diagram depicting the scope boundaries.
</script>
</div>
<div class="tab-pane" title="style.css">
<pre class="prettyprint linenums" ng-set-text="style.css-184"></pre>
<style type="text/css" id="style.css-184">
<pre class="prettyprint linenums" ng-set-text="style.css-185"></pre>
<style type="text/css" id="style.css-185">
.show-scope .doc-example-live.ng-scope,
.show-scope .doc-example-live .ng-scope {
border: 1px solid red;
@ -168,8 +168,8 @@ a diagram depicting the scope boundaries.
</style>
</div>
<div class="tab-pane" title="script.js">
<pre class="prettyprint linenums" ng-set-text="script.js-183"></pre>
<script type="text/ng-template" id="script.js-183">
<pre class="prettyprint linenums" ng-set-text="script.js-184"></pre>
<script type="text/ng-template" id="script.js-184">
function GreetCtrl($scope) {
$scope.name = 'World';
}
@ -180,7 +180,7 @@ a diagram depicting the scope boundaries.
</script>
</div>
</div><h2>Demo</h2>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-182" ng-eval-javascript="script.js-183"></div>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-183" ng-eval-javascript="script.js-184"></div>
</div>
<p><img class="center" src="img/guide/concepts-scope.png"></p>
@ -205,10 +205,10 @@ and testability.</li>
<div class="clear">
</div>
<h2>Source</h2>
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-185" source-edit-css="" source-edit-js="script.js-186" 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-186" source-edit-css="" source-edit-js="script.js-187" 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-185" ng-html-wrap=" angular.js script.js"></pre>
<script type="text/ng-template" id="index.html-185">
<pre class="prettyprint linenums" ng-set-text="index.html-186" ng-html-wrap=" angular.js script.js"></pre>
<script type="text/ng-template" id="index.html-186">
<div ng-controller="MyCtrl">
Hello {{name}}!
<button ng-click="action()">
@ -218,8 +218,8 @@ and testability.</li>
</script>
</div>
<div class="tab-pane" title="script.js">
<pre class="prettyprint linenums" ng-set-text="script.js-186"></pre>
<script type="text/ng-template" id="script.js-186">
<pre class="prettyprint linenums" ng-set-text="script.js-187"></pre>
<script type="text/ng-template" id="script.js-187">
function MyCtrl($scope) {
$scope.action = function() {
$scope.name = 'OK';
@ -230,7 +230,7 @@ and testability.</li>
</script>
</div>
</div><h2>Demo</h2>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-185" ng-eval-javascript="script.js-186"></div>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-186" ng-eval-javascript="script.js-187"></div>
<a name="model"></a>
@ -276,10 +276,10 @@ the single source-of-truth for your view.</li>
</div>
<h2>Source</h2>
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-187" 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-188" 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-187" ng-html-wrap=" angular.js"></pre>
<script type="text/ng-template" id="index.html-187">
<pre class="prettyprint linenums" ng-set-text="index.html-188" ng-html-wrap=" angular.js"></pre>
<script type="text/ng-template" id="index.html-188">
<div ng-init="list = ['Chrome', 'Safari', 'Firefox', 'IE'] ">
<input ng-model="list" ng-list> <br>
<input ng-model="list" ng-list> <br>
@ -293,7 +293,7 @@ the single source-of-truth for your view.</li>
</script>
</div>
</div><h2>Demo</h2>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-187" ng-eval-javascript=""></div>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-188" ng-eval-javascript=""></div>
<p><a name="directives"></a></p>
<h1>Directives</h1>
<p>A directive is a behavior or DOM transformation which is triggered by the presence of a custom attribute,
@ -301,17 +301,17 @@ element name, class name or comment. A directive allows you to extend the HTML v
declarative fashion. Following is an example which enables data-binding for the <code>contenteditable</code>
in HTML.</p>
<h2>Source</h2>
<div source-edit="directive" source-edit-deps="angular.js script.js" source-edit-html="index.html-189" source-edit-css="style.css-190" source-edit-js="script.js-188" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
<div source-edit="directive" source-edit-deps="angular.js script.js" source-edit-html="index.html-190" source-edit-css="style.css-191" source-edit-js="script.js-189" 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-189" ng-html-wrap="directive angular.js script.js"></pre>
<script type="text/ng-template" id="index.html-189">
<pre class="prettyprint linenums" ng-set-text="index.html-190" ng-html-wrap="directive angular.js script.js"></pre>
<script type="text/ng-template" id="index.html-190">
<div contentEditable="true" ng-model="content">Edit Me</div>
<pre>model = {{content}}</pre>
</script>
</div>
<div class="tab-pane" title="style.css">
<pre class="prettyprint linenums" ng-set-text="style.css-190"></pre>
<style type="text/css" id="style.css-190">
<pre class="prettyprint linenums" ng-set-text="style.css-191"></pre>
<style type="text/css" id="style.css-191">
div[contentEditable] {
cursor: pointer;
background-color: #D0D0D0;
@ -321,8 +321,8 @@ in HTML.</p>
</style>
</div>
<div class="tab-pane" title="script.js">
<pre class="prettyprint linenums" ng-set-text="script.js-188"></pre>
<script type="text/ng-template" id="script.js-188">
<pre class="prettyprint linenums" ng-set-text="script.js-189"></pre>
<script type="text/ng-template" id="script.js-189">
angular.module('directive', []).directive('contenteditable', function() {
return {
require: 'ngModel',
@ -347,17 +347,17 @@ in HTML.</p>
</script>
</div>
</div><h2>Demo</h2>
<div class="well doc-example-live animate-container" ng-embed-app="directive" ng-set-html="index.html-189" ng-eval-javascript="script.js-188"></div>
<div class="well doc-example-live animate-container" ng-embed-app="directive" ng-set-html="index.html-190" ng-eval-javascript="script.js-189"></div>
<p><a name="filters"></a></p>
<h1>Filters</h1>
<p><a href="api/ng.$filter"><code>Filters</code></a> perform data transformation. Typically
they are used in conjunction with the locale to format the data in locale specific output.
They follow the spirit of UNIX filters and use similar syntax <code>|</code> (pipe).</p>
<h2>Source</h2>
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-191" 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-192" 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-191" ng-html-wrap=" angular.js"></pre>
<script type="text/ng-template" id="index.html-191">
<pre class="prettyprint linenums" ng-set-text="index.html-192" ng-html-wrap=" angular.js"></pre>
<script type="text/ng-template" id="index.html-192">
<div ng-init="list = ['Chrome', 'Safari', 'Firefox', 'IE'] ">
Number formatting: {{ 1234567890 | number }} <br>
array filtering <input ng-model="predicate">
@ -366,7 +366,7 @@ They follow the spirit of UNIX filters and use similar syntax <code>|</code> (pi
</script>
</div>
</div><h2>Demo</h2>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-191" ng-eval-javascript=""></div>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-192" ng-eval-javascript=""></div>
<p><a name="module"></a>
<a name="injector"></a></p>
<h1>Modules and the Injector</h1>
@ -432,18 +432,18 @@ arguments.</p>
the controller it automatically provides the dependencies. There is no need to create
dependencies, look for dependencies, or even get a reference to the injector.</p>
<h2>Source</h2>
<div source-edit="timeExampleModule" source-edit-deps="angular.js script.js" source-edit-html="index.html-192" source-edit-css="" source-edit-js="script.js-193" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
<div source-edit="timeExampleModule" source-edit-deps="angular.js script.js" source-edit-html="index.html-193" source-edit-css="" source-edit-js="script.js-194" 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-192" ng-html-wrap="timeExampleModule angular.js script.js"></pre>
<script type="text/ng-template" id="index.html-192">
<pre class="prettyprint linenums" ng-set-text="index.html-193" ng-html-wrap="timeExampleModule angular.js script.js"></pre>
<script type="text/ng-template" id="index.html-193">
<div ng-controller="ClockCtrl">
Current time is: {{ time.now }}
</div>
</script>
</div>
<div class="tab-pane" title="script.js">
<pre class="prettyprint linenums" ng-set-text="script.js-193"></pre>
<script type="text/ng-template" id="script.js-193">
<pre class="prettyprint linenums" ng-set-text="script.js-194"></pre>
<script type="text/ng-template" id="script.js-194">
angular.module('timeExampleModule', []).
// Declare new object called time,
// which will be available for injection
@ -465,7 +465,7 @@ dependencies, look for dependencies, or even get a reference to the injector.</p
</script>
</div>
</div><h2>Demo</h3>
<div class="well doc-example-live animate-container" ng-embed-app="timeExampleModule" ng-set-html="index.html-192" ng-eval-javascript="script.js-193"></div>
<div class="well doc-example-live animate-container" ng-embed-app="timeExampleModule" ng-set-html="index.html-193" ng-eval-javascript="script.js-194"></div>
<p><a name="angular_namespace"></a></p>
<h1>Angular Namespace</h2>
<p>To prevent accidental name collision, Angular prefixes names of objects which could potentially