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

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