aboutsummaryrefslogtreecommitdiffstats
path: root/src/widget/input.js
diff options
context:
space:
mode:
authorMisko Hevery2011-10-07 11:27:49 -0700
committerIgor Minar2011-10-11 11:01:46 -0700
commitfd822bdaf9d04e522aaa5400b673f333190abe98 (patch)
tree451cd26d3f7da862692d6c56e6e8f235824c180a /src/widget/input.js
parent4f78fd692c0ec51241476e6be9a4df06cd62fdd6 (diff)
downloadangular.js-fd822bdaf9d04e522aaa5400b673f333190abe98.tar.bz2
chore(formating): clean code to be function() {
Diffstat (limited to 'src/widget/input.js')
-rw-r--r--src/widget/input.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/widget/input.js b/src/widget/input.js
index f82027f4..18d1ae12 100644
--- a/src/widget/input.js
+++ b/src/widget/input.js
@@ -25,7 +25,7 @@ var INTEGER_REGEXP = /^\s*(\-|\+)?\d+\s*$/;
<doc:example>
<doc:source>
<script>
- function Ctrl(){
+ function Ctrl() {
this.text = 'guest';
this.word = /^\w*$/;
}
@@ -87,7 +87,7 @@ var INTEGER_REGEXP = /^\s*(\-|\+)?\d+\s*$/;
<doc:example>
<doc:source>
<script>
- function Ctrl(){
+ function Ctrl() {
this.text = 'me@example.com';
}
</script>
@@ -155,7 +155,7 @@ angularInputType('email', function() {
<doc:example>
<doc:source>
<script>
- function Ctrl(){
+ function Ctrl() {
this.text = 'http://google.com';
}
</script>
@@ -222,7 +222,7 @@ angularInputType('url', function() {
<doc:example>
<doc:source>
<script>
- function Ctrl(){
+ function Ctrl() {
this.names = ['igor', 'misko', 'vojta'];
}
</script>
@@ -295,7 +295,7 @@ angularInputType('list', function() {
<doc:example>
<doc:source>
<script>
- function Ctrl(){
+ function Ctrl() {
this.value = 12;
}
</script>
@@ -359,7 +359,7 @@ angularInputType('number', numericRegexpInputType(NUMBER_REGEXP, 'NUMBER'));
<doc:example>
<doc:source>
<script>
- function Ctrl(){
+ function Ctrl() {
this.value = 12;
}
</script>
@@ -418,7 +418,7 @@ angularInputType('integer', numericRegexpInputType(INTEGER_REGEXP, 'INTEGER'));
<doc:example>
<doc:source>
<script>
- function Ctrl(){
+ function Ctrl() {
this.value1 = true;
this.value2 = 'YES'
}
@@ -446,7 +446,7 @@ angularInputType('integer', numericRegexpInputType(INTEGER_REGEXP, 'INTEGER'));
</doc:scenario>
</doc:example>
*/
-angularInputType('checkbox', function (inputElement) {
+angularInputType('checkbox', function(inputElement) {
var widget = this,
trueValue = inputElement.attr('true-value'),
falseValue = inputElement.attr('false-value');
@@ -490,7 +490,7 @@ angularInputType('checkbox', function (inputElement) {
<doc:example>
<doc:source>
<script>
- function Ctrl(){
+ function Ctrl() {
this.color = 'blue';
}
</script>
@@ -604,7 +604,7 @@ var HTML5_INPUTS_TYPES = makeMap(
<doc:example>
<doc:source>
<script>
- function Ctrl(){
+ function Ctrl() {
this.text = 'guest';
}
</script>
@@ -635,7 +635,7 @@ var HTML5_INPUTS_TYPES = makeMap(
</doc:scenario>
</doc:example>
*/
-angularWidget('input', function (inputElement){
+angularWidget('input', function(inputElement){
this.directives(true);
this.descend(true);
var modelExp = inputElement.attr('ng:model');
@@ -715,7 +715,7 @@ angularWidget('input', function (inputElement){
}
});
- forEach(['valid', 'invalid', 'pristine', 'dirty'], function (name) {
+ forEach(['valid', 'invalid', 'pristine', 'dirty'], function(name) {
widget.$watch('$' + name, function(scope, value) {
inputElement[value ? 'addClass' : 'removeClass']('ng-' + name);
}