Upgrade to angularjs 1.2.0 rc1
This commit is contained in:
parent
d223dfd662
commit
d6b021bfaf
674 changed files with 79667 additions and 62269 deletions
35
lib/angular/docs/partials/cookbook/form.html
Normal file → Executable file
35
lib/angular/docs/partials/cookbook/form.html
Normal file → Executable file
|
@ -1,15 +1,15 @@
|
|||
<h1><code ng:non-bindable=""></code>
|
||||
<span class="hint"></span>
|
||||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/cookbook/form.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable=""></code>
|
||||
<div><span class="hint"></span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><a href="http://github.com/angular/angular.js/edit/master/docs/content/cookbook/form.ngdoc" class="improve-docs btn btn-primary">Improve this doc</a><p>A web application's main purpose is to present and gather data. For this reason Angular strives
|
||||
<div><div class="cookbook-page cookbook-form-page"><p>A web application's main purpose is to present and gather data. For this reason Angular strives
|
||||
to make both of these operations trivial. This example shows off how you can build a simple form to
|
||||
allow a user to enter data.</p>
|
||||
|
||||
<h3>Source</h3>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-10" source-edit-css="" source-edit-js="script.js-9" source-edit-unit="" source-edit-scenario="scenario.js-11"></div>
|
||||
<h3>Source</h2>
|
||||
<div source-edit="" source-edit-deps="angular.js script.js" source-edit-html="index.html-173" source-edit-css="" source-edit-js="script.js-172" source-edit-json="" source-edit-unit="" source-edit-scenario="scenario.js-174"></div>
|
||||
<div class="tabbable"><div class="tab-pane" title="index.html">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-10" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-10">
|
||||
<pre class="prettyprint linenums" ng-set-text="index.html-173" ng-html-wrap=" angular.js script.js"></pre>
|
||||
<script type="text/ng-template" id="index.html-173">
|
||||
|
||||
<div ng-controller="FormController" class="example">
|
||||
|
||||
|
@ -44,8 +44,8 @@ allow a user to enter data.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="script.js">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-9"></pre>
|
||||
<script type="text/ng-template" id="script.js-9">
|
||||
<pre class="prettyprint linenums" ng-set-text="script.js-172"></pre>
|
||||
<script type="text/ng-template" id="script.js-172">
|
||||
function FormController($scope) {
|
||||
var user = $scope.user = {
|
||||
name: 'John Smith',
|
||||
|
@ -70,8 +70,8 @@ allow a user to enter data.</p>
|
|||
</script>
|
||||
</div>
|
||||
<div class="tab-pane" title="End to end test">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-11"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-11">
|
||||
<pre class="prettyprint linenums" ng-set-text="scenario.js-174"></pre>
|
||||
<script type="text/ng-template" id="scenario.js-174">
|
||||
it('should show debug', function() {
|
||||
expect(binding('user')).toMatch(/John Smith/);
|
||||
});
|
||||
|
@ -106,11 +106,9 @@ allow a user to enter data.</p>
|
|||
});
|
||||
</script>
|
||||
</div>
|
||||
</div><h3>Demo</h3>
|
||||
<div class="well doc-example-live animator-container" ng-embed-app="" ng-set-html="index.html-10" ng-eval-javascript="script.js-9"></div>
|
||||
|
||||
</div><h2>Demo</h3>
|
||||
<div class="well doc-example-live animate-container" ng-embed-app="" ng-set-html="index.html-173" ng-eval-javascript="script.js-172"></div>
|
||||
<h2>Things to notice</h2>
|
||||
|
||||
<ul>
|
||||
<li>The user data model is initialized <a href="api/ng.directive:ngController"><code>controller</code></a> and is
|
||||
available in the <a href="api/ng.$rootScope.Scope"><code>scope</code></a> with the initial data.</li>
|
||||
|
@ -120,6 +118,7 @@ is going on.</li>
|
|||
to the model and are data-bound.</li>
|
||||
<li>The inputs validate. (Try leaving them blank or entering non digits in the zip field)</li>
|
||||
<li>In your application you can simply read from or write to the model and the form will be updated.</li>
|
||||
<li>By clicking the 'add' link you are adding new items into the <code>user.contacts</code> array which are then
|
||||
<li>By clicking the 'add' link you are adding new items into the <code>user.contacts</code> array which are then
|
||||
reflected in the view.</li>
|
||||
</ul></div>
|
||||
</ul>
|
||||
</div></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue