Upgrade to angularjs 1.2.0 rc1

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

42
lib/angular/docs/partials/api/ng.directive:ngHref.html Normal file → Executable file
View file

@ -1,39 +1,36 @@
<h1><code ng:non-bindable="">ngHref</code>
<span class="hint">(directive in module <code ng:non-bindable="">ng</code>
)</span>
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ng/directive/booleanAttrs.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/ng/directive/booleanAttrs.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">ngHref</code>
<div><span class="hint">directive in module <code ng:non-bindable="">ng</code>
</span>
</div>
</h1>
<div><a href="http://github.com/angular/angular.js/edit/master/src/ng/directive/booleanAttrs.js" class="improve-docs btn btn-primary">Improve this doc</a><h2 id="Description">Description</h2>
<div class="description"><p>Using Angular markup like {{hash}} in an href attribute makes
<div><h2 id="Description">Description</h2>
<div class="description"><div class="ng-directive-page ng-directive-nghref-page"><p>Using Angular markup like {{hash}} in an href attribute makes
the page open to a wrong URL, if the user clicks that link before
angular has a chance to replace the {{hash}} with actual URL, the
link will be broken and will most likely return a 404 error.
The <code>ngHref</code> directive solves this problem.</p>
<p>The buggy way to write it:
<pre class="prettyprint linenums">
&lt;a href="http://www.gravatar.com/avatar/{{hash}}"/&gt;
</pre>
<p>The correct way to write it:
<pre class="prettyprint linenums">
&lt;a ng-href="http://www.gravatar.com/avatar/{{hash}}"/&gt;
</pre></div>
</pre>
</div></div>
<h2 id="Usage">Usage</h2>
<div class="usage">as attribute<pre class="prettyprint linenums">&lt;A ng-href="{template}"&gt;
...
&lt;/A&gt;</pre>
<h3 id="Parameters">Parameters</h3>
<ul class="parameters"><li><code ng:non-bindable="">ngHref {template} </code>
<p>any string which can contain <code>{{}}</code> markup.</p></li>
</ul>
</div>
<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>ngHref</td><td><a href="" class="label type-hint type-hint-template">template</a></td><td><div class="ng-directive-page ng-directive-nghref-page"><p>any string which can contain <code>{{}}</code> markup.</p>
</div></td></tr></tbody></table></div>
<h2 id="Example">Example</h2>
<div class="example"><p>This example uses <code>link</code> variable inside <code>href</code> attribute:
<h4>Source</h4>
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-86" source-edit-css="" source-edit-js="" source-edit-unit="" source-edit-scenario="scenario.js-87"></div>
<div class="example"><div class="ng-directive-page ng-directive-nghref-page"><p>This example uses <code>link</code> variable inside <code>href</code> attribute:
<h4>Source</h2>
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-1" source-edit-css="" source-edit-js="" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-2"></div>
<div class="tabbable"><div class="tab-pane" title="index.html">
<pre class="prettyprint linenums" ng-set-text="index.html-86" ng-html-wrap=" angular.js"></pre>
<script type="text/ng-template" id="index.html-86">
<pre class="prettyprint linenums" ng-set-text="index.html-1" ng-html-wrap=" angular.js"></pre>
<script type="text/ng-template" id="index.html-1">
<input ng-model="value" /><br />
<a id="link-1" href ng-click="value = 1">link 1</a> (link, don't reload)<br />
<a id="link-2" href="" ng-click="value = 2">link 2</a> (link, don't reload)<br />
@ -44,8 +41,8 @@ The <code>ngHref</code> directive solves this problem.</p>
</script>
</div>
<div class="tab-pane" title="End to end test">
<pre class="prettyprint linenums" ng-set-text="scenario.js-87"></pre>
<script type="text/ng-template" id="scenario.js-87">
<pre class="prettyprint linenums" ng-set-text="scenario.js-2"></pre>
<script type="text/ng-template" id="scenario.js-2">
it('should execute ng-click but not reload when href without value', function() {
element('#link-1').click();
expect(input('value').val()).toEqual('1');
@ -86,6 +83,7 @@ The <code>ngHref</code> directive solves this problem.</p>
});
</script>
</div>
</div><h4>Demo</h4>
<div class="well doc-example-live animator-container" ng-embed-app="" ng-set-html="index.html-86" ng-eval-javascript=""></div></div>
</div><h2>Demo</h4>
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-1" ng-eval-javascript=""></div>
</div></div>
</div>