Update everything
This commit is contained in:
parent
bf368181a4
commit
72a485d6e8
319 changed files with 67958 additions and 13948 deletions
30
lib/angular/docs/partials/api/ng.$window.html
Normal file
30
lib/angular/docs/partials/api/ng.$window.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
<h1><code ng:non-bindable="">$window</code>
|
||||
<span class="hint">(service in module <code ng:non-bindable="">ng</code>
|
||||
)</span>
|
||||
</h1>
|
||||
<div><h2 id="Description">Description</h2>
|
||||
<div class="description"><p>A reference to the browser's <code>window</code> object. While <code>window</code>
|
||||
is globally available in JavaScript, it causes testability problems, because
|
||||
it is a global variable. In angular we always refer to it through the
|
||||
<code>$window</code> service, so it may be overriden, removed or mocked for testing.</p>
|
||||
|
||||
<p>All expressions are evaluated with respect to current scope so they don't
|
||||
suffer from window globality.</p></div>
|
||||
<h2 id="Example">Example</h2>
|
||||
<div class="example"><h4>Source</h4>
|
||||
<div source-edit="" source-edit-deps="angular.js" source-edit-html="index.html-218" source-edit-css="" source-edit-js="" source-edit-unit="" source-edit-scenario="scenario.js-219"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-218" ng-html-wrap=" angular.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-218">
|
||||
<input ng-init="$window = $service('$window'); greeting='Hello World!'" type="text" ng-model="greeting" />
|
||||
<button ng-click="$window.alert(greeting)">ALERT</button>
|
||||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-219"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-219">
|
||||
</script>
|
||||
</div>
|
||||
</div><h4>Demo</h4>
|
||||
<div class="well doc-example-live" ng-embed-app="" ng-set-html="index.html-218" ng-eval-javascript=""></div></div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue