diff options
| author | Misko Hevery | 2011-10-07 11:27:49 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-10-11 11:01:46 -0700 | 
| commit | fd822bdaf9d04e522aaa5400b673f333190abe98 (patch) | |
| tree | 451cd26d3f7da862692d6c56e6e8f235824c180a /docs/content/cookbook | |
| parent | 4f78fd692c0ec51241476e6be9a4df06cd62fdd6 (diff) | |
| download | angular.js-fd822bdaf9d04e522aaa5400b673f333190abe98.tar.bz2 | |
chore(formating): clean code to be function() {
Diffstat (limited to 'docs/content/cookbook')
| -rw-r--r-- | docs/content/cookbook/advancedform.ngdoc | 10 | ||||
| -rw-r--r-- | docs/content/cookbook/deeplinking.ngdoc | 8 | ||||
| -rw-r--r-- | docs/content/cookbook/form.ngdoc | 12 | ||||
| -rw-r--r-- | docs/content/cookbook/helloworld.ngdoc | 4 | ||||
| -rw-r--r-- | docs/content/cookbook/mvc.ngdoc | 8 | 
5 files changed, 21 insertions, 21 deletions
| diff --git a/docs/content/cookbook/advancedform.ngdoc b/docs/content/cookbook/advancedform.ngdoc index d38008f2..8e29ed35 100644 --- a/docs/content/cookbook/advancedform.ngdoc +++ b/docs/content/cookbook/advancedform.ngdoc @@ -9,7 +9,7 @@ detection, and preventing invalid form submission.  <doc:example>  <doc:source>     <script> -   function UserForm(){ +   function UserForm() {       this.state = /^\w\w$/;       this.zip = /^\d\d\d\d\d$/;       this.master = { @@ -28,11 +28,11 @@ detection, and preventing invalid form submission.     }     UserForm.prototype = { -     cancel: function(){ +     cancel: function() {         this.form = angular.copy(this.master);       }, -     save: function(){ +     save: function() {         this.master = this.form;         this.cancel();       } @@ -76,7 +76,7 @@ detection, and preventing invalid form submission.     </div>  </doc:source>  <doc:scenario> -  it('should enable save button', function(){ +  it('should enable save button', function() {      expect(element(':button:contains(Save)').attr('disabled')).toBeTruthy();      input('form.name').enter('');      expect(element(':button:contains(Save)').attr('disabled')).toBeTruthy(); @@ -85,7 +85,7 @@ detection, and preventing invalid form submission.      element(':button:contains(Save)').click();      expect(element(':button:contains(Save)').attr('disabled')).toBeTruthy();    }); -  it('should enable cancel button', function(){ +  it('should enable cancel button', function() {      expect(element(':button:contains(Cancel)').attr('disabled')).toBeTruthy();      input('form.name').enter('change');      expect(element(':button:contains(Cancel)').attr('disabled')).toBeFalsy(); diff --git a/docs/content/cookbook/deeplinking.ngdoc b/docs/content/cookbook/deeplinking.ngdoc index 6747b55f..9e00f362 100644 --- a/docs/content/cookbook/deeplinking.ngdoc +++ b/docs/content/cookbook/deeplinking.ngdoc @@ -56,7 +56,7 @@ The two partials are defined in the following URLs:       function WelcomeCntl($route){}       WelcomeCntl.prototype = { -      greet: function(){ +      greet: function() {         alert("Hello " + this.person.name);        }       }; @@ -67,11 +67,11 @@ The two partials are defined in the following URLs:        this.cancel();       }       SettingsCntl.prototype = { -      cancel: function(){ +      cancel: function() {         this.form = angular.copy(this.person);        }, -      save: function(){ +      save: function() {         angular.copy(this.form, this.person);         this.$location.path('/welcome');        } @@ -89,7 +89,7 @@ The two partials are defined in the following URLs:      </div>   </doc:source>   <doc:scenario> -   it('should navigate to URL', function(){ +   it('should navigate to URL', function() {      element('a:contains(Welcome)').click();      expect(element('ng\\:view').text()).toMatch(/Hello anonymous/);      element('a:contains(Settings)').click(); diff --git a/docs/content/cookbook/form.ngdoc b/docs/content/cookbook/form.ngdoc index c74b203b..874db792 100644 --- a/docs/content/cookbook/form.ngdoc +++ b/docs/content/cookbook/form.ngdoc @@ -11,7 +11,7 @@ allow a user to enter data.  <doc:example>   <doc:source>    <script> -    function FormController(){ +    function FormController() {        this.user = {          name: 'John Smith',          address:{line1: '123 Main St.', city:'Anytown', state:'AA', zip:'12345'}, @@ -53,22 +53,22 @@ allow a user to enter data.   </doc:source>   <doc:scenario> -  it('should show debug', function(){ +  it('should show debug', function() {      expect(binding('user')).toMatch(/John Smith/);    }); -  it('should add contact', function(){ +  it('should add contact', function() {      using('.example').element('a:contains(add)').click();      using('.example div:last').input('contact.value').enter('you@example.org');      expect(binding('user')).toMatch(/\(234\) 555\-1212/);      expect(binding('user')).toMatch(/you@example.org/);    }); -  it('should remove contact', function(){ +  it('should remove contact', function() {      using('.example').element('a:contains(X)').click();      expect(binding('user')).not().toMatch(/\(234\) 555\-1212/);    }); -  it('should validate zip', function(){ +  it('should validate zip', function() {      expect(using('.example').        element(':input[ng\\:model="user.address.zip"]').        prop('className')).not().toMatch(/ng-invalid/); @@ -78,7 +78,7 @@ allow a user to enter data.        prop('className')).toMatch(/ng-invalid/);    }); -  it('should validate state', function(){ +  it('should validate state', function() {      expect(using('.example').element(':input[ng\\:model="user.address.state"]').prop('className'))        .not().toMatch(/ng-invalid/);      using('.example').input('user.address.state').enter('XXX'); diff --git a/docs/content/cookbook/helloworld.ngdoc b/docs/content/cookbook/helloworld.ngdoc index 9562aaff..67d78bbe 100644 --- a/docs/content/cookbook/helloworld.ngdoc +++ b/docs/content/cookbook/helloworld.ngdoc @@ -6,7 +6,7 @@  <doc:example>   <doc:source>    <script> -    function HelloCntl(){ +    function HelloCntl() {        this.name = 'World';      }    </script> @@ -17,7 +17,7 @@    </div>   </doc:source>   <doc:scenario> -   it('should change the binding when user enters text', function(){ +   it('should change the binding when user enters text', function() {       expect(binding('name')).toEqual('World');       input('name').enter('angular');       expect(binding('name')).toEqual('angular'); diff --git a/docs/content/cookbook/mvc.ngdoc b/docs/content/cookbook/mvc.ngdoc index 4529cd29..a9ab7f3c 100644 --- a/docs/content/cookbook/mvc.ngdoc +++ b/docs/content/cookbook/mvc.ngdoc @@ -36,7 +36,7 @@ no connection between the controller and the view.            this.setUrl();          }        }, -      reset: function(){ +      reset: function() {          this.board = [            ['', '', ''],            ['', '', ''], @@ -46,7 +46,7 @@ no connection between the controller and the view.          this.winner = '';          this.setUrl();        }, -      grade: function(){ +      grade: function() {          var b = this.board;          this.winner =            row(0) || row(1) || row(2) || @@ -57,7 +57,7 @@ no connection between the controller and the view.          function diagonal(i) { return same(b[0][1-i], b[1][1], b[2][1+i]);}          function same(a, b, c) { return (a==b && b==c) ? a : '';};        }, -      setUrl: function(){ +      setUrl: function() {          var rows = [];          angular.forEach(this.board, function(row){            rows.push(row.join(',')); @@ -91,7 +91,7 @@ no connection between the controller and the view.      </div>    </doc:source>    <doc:scenario> -    it('should play a game', function(){ +    it('should play a game', function() {       piece(1, 1);       expect(binding('nextMove')).toEqual('O');       piece(3, 1); | 
