Unified
Split
Showing
with
11 additions
and 9 deletions.
- +2 −2 docs/content/guide/concepts.ngdoc
- +5 −5 src/ng/directive/input.js
- +3 −1 src/ng/directive/ngClass.js
- +1 −1 src/ng/sniffer.js
| @@ -277,8 +277,8 @@ Now that Angular knows of all the parts of the application, it needs to create t | ||
| In the previous section we saw that controllers are created using a factory function. | ||
| For services there are multiple ways to define their factory | ||
| (see the {@link services service guide}). | ||
| In the example above, we are using a function that returns the `currencyConverter` function as the factory | ||
| for the service. | ||
| In the example above, we are using an anonymous function as the factory function for `currencyConverter` service. | ||
| This function should return the `currencyConverter` service instance. | ||
|
|
||
| Back to the initial question: How does the `InvoiceController` get a reference to the `currencyConverter` function? | ||
| In Angular, this is done by simply defining arguments on the constructor function. With this, the injector | ||
| @@ -100,11 +100,11 @@ var inputType = { | ||
| <span class="error" ng-show="myForm.input.$error.pattern"> | ||
| Single word only!</span> | ||
| </div> | ||
| <tt>text = {{example.text}}</tt><br/> | ||
| <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> | ||
| <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> | ||
| <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> | ||
| <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/> | ||
| <code>text = {{example.text}}</code><br/> | ||
| <code>myForm.input.$valid = {{myForm.input.$valid}}</code><br/> | ||
| <code>myForm.input.$error = {{myForm.input.$error}}</code><br/> | ||
| <code>myForm.$valid = {{myForm.$valid}}</code><br/> | ||
| <code>myForm.$error.required = {{!!myForm.$error.required}}</code><br/> | ||
| </form> | ||
| </file> | ||
| <file name="protractor.js" type="protractor"> | ||
| @@ -69,7 +69,9 @@ function classDirective(name, selector) { | ||
| } | ||
|
|
||
| function ngClassWatchAction(newVal) { | ||
| if (selector === true || scope.$index % 2 === selector) { | ||
| // jshint bitwise: false | ||
| if (selector === true || (scope.$index & 1) === selector) { | ||
| // jshint bitwise: true | ||
| var newClasses = arrayClasses(newVal || []); | ||
| if (!oldVal) { | ||
| addClasses(newClasses); | ||
| @@ -36,7 +36,7 @@ function $SnifferProvider() { | ||
| for (var prop in bodyStyle) { | ||
| if (match = vendorRegex.exec(prop)) { | ||
| vendorPrefix = match[0]; | ||
| vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1); | ||
| vendorPrefix = vendorPrefix[0].toUpperCase() + vendorPrefix.substr(1); | ||
| break; | ||
| } | ||
| } | ||