Skip to content

Commit fd822bd

Browse files
mheveryIgorMinar
authored andcommitted
chore(formating): clean code to be function() {
1 parent 4f78fd6 commit fd822bd

File tree

107 files changed

+942
-941
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+942
-941
lines changed

docs/content/api/angular.inputType.ngdoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ All `inputType` widgets support:
4040
<doc:example>
4141
<doc:source>
4242
<script>
43-
angular.inputType('json', function(){
44-
this.$parseView = function(){
43+
angular.inputType('json', function() {
44+
this.$parseView = function() {
4545
try {
4646
this.$modelValue = angular.fromJson(this.$viewValue);
4747
if (this.$error.JSON) {
@@ -52,12 +52,12 @@ All `inputType` widgets support:
5252
}
5353
}
5454

55-
this.$parseModel = function(){
55+
this.$parseModel = function() {
5656
this.$viewValue = angular.toJson(this.$modelValue);
5757
}
5858
});
5959

60-
function Ctrl(){
60+
function Ctrl() {
6161
this.data = {
6262
framework:'angular',
6363
codenames:'supper-powers'
@@ -81,7 +81,7 @@ All `inputType` widgets support:
8181
</div>
8282
</doc:source>
8383
<doc:scenario>
84-
it('should invalidate on wrong input', function(){
84+
it('should invalidate on wrong input', function() {
8585
expect(element('form[name=myForm]').prop('className')).toMatch('ng-valid');
8686
input('data').enter('{}');
8787
expect(binding('data')).toEqual('data={\n }');

docs/content/cookbook/advancedform.ngdoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ detection, and preventing invalid form submission.
99
<doc:example>
1010
<doc:source>
1111
<script>
12-
function UserForm(){
12+
function UserForm() {
1313
this.state = /^\w\w$/;
1414
this.zip = /^\d\d\d\d\d$/;
1515
this.master = {
@@ -28,11 +28,11 @@ detection, and preventing invalid form submission.
2828
}
2929

3030
UserForm.prototype = {
31-
cancel: function(){
31+
cancel: function() {
3232
this.form = angular.copy(this.master);
3333
},
3434

35-
save: function(){
35+
save: function() {
3636
this.master = this.form;
3737
this.cancel();
3838
}
@@ -76,7 +76,7 @@ detection, and preventing invalid form submission.
7676
</div>
7777
</doc:source>
7878
<doc:scenario>
79-
it('should enable save button', function(){
79+
it('should enable save button', function() {
8080
expect(element(':button:contains(Save)').attr('disabled')).toBeTruthy();
8181
input('form.name').enter('');
8282
expect(element(':button:contains(Save)').attr('disabled')).toBeTruthy();
@@ -85,7 +85,7 @@ detection, and preventing invalid form submission.
8585
element(':button:contains(Save)').click();
8686
expect(element(':button:contains(Save)').attr('disabled')).toBeTruthy();
8787
});
88-
it('should enable cancel button', function(){
88+
it('should enable cancel button', function() {
8989
expect(element(':button:contains(Cancel)').attr('disabled')).toBeTruthy();
9090
input('form.name').enter('change');
9191
expect(element(':button:contains(Cancel)').attr('disabled')).toBeFalsy();

docs/content/cookbook/deeplinking.ngdoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The two partials are defined in the following URLs:
5656

5757
function WelcomeCntl($route){}
5858
WelcomeCntl.prototype = {
59-
greet: function(){
59+
greet: function() {
6060
alert("Hello " + this.person.name);
6161
}
6262
};
@@ -67,11 +67,11 @@ The two partials are defined in the following URLs:
6767
this.cancel();
6868
}
6969
SettingsCntl.prototype = {
70-
cancel: function(){
70+
cancel: function() {
7171
this.form = angular.copy(this.person);
7272
},
7373

74-
save: function(){
74+
save: function() {
7575
angular.copy(this.form, this.person);
7676
this.$location.path('/welcome');
7777
}
@@ -89,7 +89,7 @@ The two partials are defined in the following URLs:
8989
</div>
9090
</doc:source>
9191
<doc:scenario>
92-
it('should navigate to URL', function(){
92+
it('should navigate to URL', function() {
9393
element('a:contains(Welcome)').click();
9494
expect(element('ng\\:view').text()).toMatch(/Hello anonymous/);
9595
element('a:contains(Settings)').click();

docs/content/cookbook/form.ngdoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ allow a user to enter data.
1111
<doc:example>
1212
<doc:source>
1313
<script>
14-
function FormController(){
14+
function FormController() {
1515
this.user = {
1616
name: 'John Smith',
1717
address:{line1: '123 Main St.', city:'Anytown', state:'AA', zip:'12345'},
@@ -53,22 +53,22 @@ allow a user to enter data.
5353

5454
</doc:source>
5555
<doc:scenario>
56-
it('should show debug', function(){
56+
it('should show debug', function() {
5757
expect(binding('user')).toMatch(/John Smith/);
5858
});
59-
it('should add contact', function(){
59+
it('should add contact', function() {
6060
using('.example').element('a:contains(add)').click();
6161
using('.example div:last').input('contact.value').enter('[email protected]');
6262
expect(binding('user')).toMatch(/\(234\) 555\-1212/);
6363
expect(binding('user')).toMatch(/[email protected]/);
6464
});
6565

66-
it('should remove contact', function(){
66+
it('should remove contact', function() {
6767
using('.example').element('a:contains(X)').click();
6868
expect(binding('user')).not().toMatch(/\(234\) 555\-1212/);
6969
});
7070

71-
it('should validate zip', function(){
71+
it('should validate zip', function() {
7272
expect(using('.example').
7373
element(':input[ng\\:model="user.address.zip"]').
7474
prop('className')).not().toMatch(/ng-invalid/);
@@ -78,7 +78,7 @@ allow a user to enter data.
7878
prop('className')).toMatch(/ng-invalid/);
7979
});
8080

81-
it('should validate state', function(){
81+
it('should validate state', function() {
8282
expect(using('.example').element(':input[ng\\:model="user.address.state"]').prop('className'))
8383
.not().toMatch(/ng-invalid/);
8484
using('.example').input('user.address.state').enter('XXX');

docs/content/cookbook/helloworld.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<doc:example>
77
<doc:source>
88
<script>
9-
function HelloCntl(){
9+
function HelloCntl() {
1010
this.name = 'World';
1111
}
1212
</script>
@@ -17,7 +17,7 @@
1717
</div>
1818
</doc:source>
1919
<doc:scenario>
20-
it('should change the binding when user enters text', function(){
20+
it('should change the binding when user enters text', function() {
2121
expect(binding('name')).toEqual('World');
2222
input('name').enter('angular');
2323
expect(binding('name')).toEqual('angular');

docs/content/cookbook/mvc.ngdoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ no connection between the controller and the view.
3636
this.setUrl();
3737
}
3838
},
39-
reset: function(){
39+
reset: function() {
4040
this.board = [
4141
['', '', ''],
4242
['', '', ''],
@@ -46,7 +46,7 @@ no connection between the controller and the view.
4646
this.winner = '';
4747
this.setUrl();
4848
},
49-
grade: function(){
49+
grade: function() {
5050
var b = this.board;
5151
this.winner =
5252
row(0) || row(1) || row(2) ||
@@ -57,7 +57,7 @@ no connection between the controller and the view.
5757
function diagonal(i) { return same(b[0][1-i], b[1][1], b[2][1+i]);}
5858
function same(a, b, c) { return (a==b && b==c) ? a : '';};
5959
},
60-
setUrl: function(){
60+
setUrl: function() {
6161
var rows = [];
6262
angular.forEach(this.board, function(row){
6363
rows.push(row.join(','));
@@ -91,7 +91,7 @@ no connection between the controller and the view.
9191
</div>
9292
</doc:source>
9393
<doc:scenario>
94-
it('should play a game', function(){
94+
it('should play a game', function() {
9595
piece(1, 1);
9696
expect(binding('nextMove')).toEqual('O');
9797
piece(3, 1);

docs/content/guide/dev_guide.compiler.widgets.creating_widgets.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ angular.widget('@my:watch', function(expression, compileElement) {
6161
angular.widget('my:time', function(compileElement){
6262
compileElement.css('display', 'block');
6363
return function(linkElement){
64-
function update(){
64+
function update() {
6565
linkElement.text('Current time is: ' + new Date());
6666
setTimeout(update, 1000);
6767
}

docs/content/guide/dev_guide.expressions.ngdoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ the `Scope:$eval()` method.
4141
1+2={{1+2}}
4242
</doc:source>
4343
<doc:scenario>
44-
it('should calculate expression in binding', function(){
44+
it('should calculate expression in binding', function() {
4545
expect(binding('1+2')).toEqual('3');
4646
});
4747
</doc:scenario>
@@ -52,7 +52,7 @@ You can try evaluating different expressions here:
5252
<doc:example>
5353
<doc:source>
5454
<script>
55-
function Cntl2(){
55+
function Cntl2() {
5656
this.exprs = [];
5757
this.expr = '3*10|currency';
5858
}
@@ -70,7 +70,7 @@ You can try evaluating different expressions here:
7070
</div>
7171
</doc:source>
7272
<doc:scenario>
73-
it('should allow user expression testing', function(){
73+
it('should allow user expression testing', function() {
7474
element('.expressions :button').click();
7575
var li = using('.expressions ul').repeater('li');
7676
expect(li.count()).toBe(1);
@@ -105,7 +105,7 @@ the global state (a common source of subtle bugs).
105105
</div>
106106
</doc:source>
107107
<doc:scenario>
108-
it('should calculate expression in binding', function(){
108+
it('should calculate expression in binding', function() {
109109
var alertText;
110110
this.addFutureAction('set mock', function($window, $document, done) {
111111
$window.mockWindow = {
@@ -183,7 +183,7 @@ Extensions: You can further extend the expression vocabulary by adding new metho
183183
</table>
184184
</doc:source>
185185
<doc:scenario>
186-
it('should filter the list', function(){
186+
it('should filter the list', function() {
187187
var tr = using('table.example3').repeater('tr.ng-attr-widget');
188188
expect(tr.count()).toBe(5);
189189
input('searchText').enter('a');

0 commit comments

Comments
 (0)