From f4d338d393dabb49182d40b4fe90c4d1b51621c0 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 9 Mar 2012 00:00:05 -0800 Subject: chore(*): refactor all ng: to ng- --- src/directive/a.js | 6 +- src/directive/booleanAttrDirs.js | 84 +++++++++--------- src/directive/form.js | 20 ++--- src/directive/input.js | 184 +++++++++++++++++++-------------------- src/directive/ngBind.js | 72 +++++++-------- src/directive/ngClass.js | 46 +++++----- src/directive/ngCloak.js | 20 ++--- src/directive/ngController.js | 24 ++--- src/directive/ngEventDirs.js | 48 +++++----- src/directive/ngInclude.js | 18 ++-- src/directive/ngInit.js | 6 +- src/directive/ngNonBindable.js | 12 +-- src/directive/ngPluralize.js | 34 ++++---- src/directive/ngRepeat.js | 16 ++-- src/directive/ngShowHide.js | 24 ++--- src/directive/ngStyle.js | 12 +-- src/directive/ngSwitch.js | 34 ++++---- src/directive/ngTransclude.js | 8 +- src/directive/ngView.js | 20 ++--- src/directive/script.js | 4 +- src/directive/select.js | 40 ++++----- 21 files changed, 366 insertions(+), 366 deletions(-) (limited to 'src/directive') diff --git a/src/directive/a.js b/src/directive/a.js index bd56f3be..d96af784 100644 --- a/src/directive/a.js +++ b/src/directive/a.js @@ -4,14 +4,14 @@ * Modifies the default behavior of html A tag, so that the default action is prevented when href * attribute is empty. * - * The reasoning for this change is to allow easy creation of action links with ng:click without + * The reasoning for this change is to allow easy creation of action links with ng-click without * changing the location or causing page reloads, e.g.: - * Save + * Save */ var htmlAnchorDirective = valueFn({ restrict: 'E', compile: function(element, attr) { - // turn link into a link in IE + // turn link into a link in IE // but only if it doesn't have name attribute, in which case it's an anchor if (!attr.href) { attr.$set('href', ''); diff --git a/src/directive/booleanAttrDirs.js b/src/directive/booleanAttrDirs.js index 06b85823..0c1731a8 100644 --- a/src/directive/booleanAttrDirs.js +++ b/src/directive/booleanAttrDirs.js @@ -2,15 +2,15 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:href + * @name angular.module.ng.$compileProvider.directive.ng-href * * @description * Using markup like {{hash}} in an href attribute makes * the page open to a wrong URL, if the user clicks that link before * angular has a chance to replace the {{hash}} with actual URL, the * link will be broken and will most likely return a 404 error. - * The `ng:href` solves this problem by placing the `href` in the - * `ng:` namespace. + * The `ng-href` solves this problem by placing the `href` in the + * `ng-` namespace. * * The buggy way to write it: *
@@ -19,7 +19,7 @@
  *
  * The correct way to write it:
  * 
- * 
+ * 
  * 
* * @element ANY @@ -29,47 +29,47 @@ * This example uses `link` variable inside `href` attribute: -
-
link 1 (link, don't reload)
- link 2 (link, don't reload)
- link 3 (link, reload!)
- anchor (link, don't reload)
- anchor (no link)
- link (link, change hash) +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change hash) - it('should execute ng:click but not reload when href without value', function() { + it('should execute ng-click but not reload when href without value', function() { element('#link-1').click(); expect(input('value').val()).toEqual('1'); expect(element('#link-1').attr('href')).toBe(""); }); - it('should execute ng:click but not reload when href empty string', function() { + it('should execute ng-click but not reload when href empty string', function() { element('#link-2').click(); expect(input('value').val()).toEqual('2'); expect(element('#link-2').attr('href')).toBe(""); }); - it('should execute ng:click and change url when ng:href specified', function() { + it('should execute ng-click and change url when ng-href specified', function() { expect(element('#link-3').attr('href')).toBe("/123"); element('#link-3').click(); expect(browser().window().path()).toEqual('/123'); }); - it('should execute ng:click but not reload when href empty string and name specified', function() { + it('should execute ng-click but not reload when href empty string and name specified', function() { element('#link-4').click(); expect(input('value').val()).toEqual('4'); expect(element('#link-4').attr('href')).toBe(""); }); - it('should execute ng:click but not reload when no href but name specified', function() { + it('should execute ng-click but not reload when no href but name specified', function() { element('#link-5').click(); expect(input('value').val()).toEqual('5'); expect(element('#link-5').attr('href')).toBe(""); }); - it('should only change url when only ng:href', function() { + it('should only change url when only ng-href', function() { input('value').enter('6'); expect(element('#link-6').attr('href')).toBe("/6"); @@ -82,14 +82,14 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:src + * @name angular.module.ng.$compileProvider.directive.ng-src * * @description * Using markup like `{{hash}}` in a `src` attribute doesn't * work right: The browser will fetch from the URL with the literal * text `{{hash}}` until replaces the expression inside - * `{{hash}}`. The `ng:src` attribute solves this problem by placing - * the `src` attribute in the `ng:` namespace. + * `{{hash}}`. The `ng-src` attribute solves this problem by placing + * the `src` attribute in the `ng-` namespace. * * The buggy way to write it: *
@@ -98,7 +98,7 @@
  *
  * The correct way to write it:
  * 
- * 
+ * 
  * 
* * @element ANY @@ -107,13 +107,13 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:disabled + * @name angular.module.ng.$compileProvider.directive.ng-disabled * * @description * * The following markup will make the button enabled on Chrome/Firefox but not on IE8 and older IEs: *
- * 
+ *
* *
*
@@ -121,13 +121,13 @@ * The HTML specs do not require browsers to preserve the special attributes such as disabled. * (The presence of them means true and absence means false) * This prevents the angular compiler from correctly retrieving the binding expression. - * To solve this problem, we introduce ng:disabled. + * To solve this problem, we introduce ng-disabled. * * @example - Click me to toggle:
- + Click me to toggle:
+
it('should toggle button', function() { @@ -145,18 +145,18 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:checked + * @name angular.module.ng.$compileProvider.directive.ng-checked * * @description * The HTML specs do not require browsers to preserve the special attributes such as checked. * (The presence of them means true and absence means false) * This prevents the angular compiler from correctly retrieving the binding expression. - * To solve this problem, we introduce ng:checked. + * To solve this problem, we introduce ng-checked. * @example - Check me to check both:
- + Check me to check both:
+
it('should check both checkBoxes', function() { @@ -174,19 +174,19 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:multiple + * @name angular.module.ng.$compileProvider.directive.ng-multiple * * @description * The HTML specs do not require browsers to preserve the special attributes such as multiple. * (The presence of them means true and absence means false) * This prevents the angular compiler from correctly retrieving the binding expression. - * To solve this problem, we introduce ng:multiple. + * To solve this problem, we introduce ng-multiple. * * @example - Check me check multiple:
-
+
- + Check me to make text readonly:
+
it('should toggle readonly attr', function() { @@ -238,20 +238,20 @@ /** * @ngdoc directive -* @name angular.module.ng.$compileProvider.directive.ng:selected +* @name angular.module.ng.$compileProvider.directive.ng-selected * * @description * The HTML specs do not require browsers to preserve the special attributes such as selected. * (The presence of them means true and absence means false) * This prevents the angular compiler from correctly retrieving the binding expression. -* To solve this problem, we introduce ng:selected. +* To solve this problem, we introduce ng-selected. * @example - Check me to select:
+ Check me to select:
diff --git a/src/directive/form.js b/src/directive/form.js index e3b937da..84352902 100644 --- a/src/directive/form.js +++ b/src/directive/form.js @@ -113,11 +113,11 @@ function FormController($scope, name) { * * If `name` attribute is specified, the controller is published to the scope as well. * - * # Alias: `ng:form` + * # Alias: `ng-form` * * In angular forms can be nested. This means that the outer form is valid when all of the child * forms are valid as well. However browsers do not allow nesting of `
` elements, for this - * reason angular provides `` alias which behaves identical to `` but allows + * reason angular provides `` alias which behaves identical to `` but allows * element nesting. * * @@ -141,19 +141,19 @@ function FormController($scope, name) { * You can use one of the following two ways to specify what javascript method should be called when * a form is submitted: * - * - ng:submit on the form element (add link to ng:submit) - * - ng:click on the first button or input field of type submit (input[type=submit]) + * - ng-submit on the form element (add link to ng-submit) + * - ng-click on the first button or input field of type submit (input[type=submit]) * - * To prevent double execution of the handler, use only one of ng:submit or ng:click. This is + * To prevent double execution of the handler, use only one of ng-submit or ng-click. This is * because of the following form submission rules coming from the html spec: * * - If a form has only one input field then hitting enter in this field triggers form submit - * (`ng:submit`) + * (`ng-submit`) * - if a form has has 2+ input fields and no buttons or input[type=submit] then hitting enter * doesn't trigger submit * - if a form has one or more input fields and one or more buttons or input[type=submit] then * hitting enter in any of the input fields will trigger the click handler on the *first* button or - * input[type=submit] (`ng:click`) *and* a submit handler on the enclosing form (`ng:submit`) + * input[type=submit] (`ng-click`) *and* a submit handler on the enclosing form (`ng-submit`) * * @param {string=} name Name of the form. If specified, the form controller will be published into * related scope, under this name. @@ -166,9 +166,9 @@ function FormController($scope, name) { $scope.text = 'guest'; } - - text: - Required! + + text: + Required! text = {{text}}
myForm.input.valid = {{myForm.input.valid}}
myForm.input.error = {{myForm.input.error}}
diff --git a/src/directive/input.js b/src/directive/input.js index 8eea48a3..cb6a8f96 100644 --- a/src/directive/input.js +++ b/src/directive/input.js @@ -13,17 +13,17 @@ var inputType = { * @description * Standard HTML text input with angular data binding. * - * @param {string} ng:model Assignable angular expression to data-bind to. + * @param {string} ng-model Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the widgets is published. * @param {string=} required Sets `REQUIRED` validation error key if the value is not entered. - * @param {number=} ng:minlength Sets `MINLENGTH` validation error key if the value is shorter than + * @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than * minlength. - * @param {number=} ng:maxlength Sets `MAXLENGTH` validation error key if the value is longer than + * @param {number=} ng-maxlength Sets `MAXLENGTH` validation error key if the value is longer than * maxlength. - * @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the + * @param {string=} ng-pattern Sets `PATTERN` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. - * @param {string=} ng:change Angular expression to be executed when input changes due to user + * @param {string=} ng-change Angular expression to be executed when input changes due to user * interaction with the input element. * * @example @@ -35,12 +35,12 @@ var inputType = { $scope.word = /^\w*$/; } - - Single word: - + + Single word: + Required! - + Single word only! text = {{text}}
@@ -80,19 +80,19 @@ var inputType = { * Text input with number validation and transformation. Sets the `NUMBER` validation * error if not a valid number. * - * @param {string} ng:model Assignable angular expression to data-bind to. + * @param {string} ng-model Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the widgets is published. * @param {string=} min Sets the `MIN` validation error key if the value entered is less then `min`. * @param {string=} max Sets the `MAX` validation error key if the value entered is greater then `min`. * @param {string=} required Sets `REQUIRED` validation error key if the value is not entered. - * @param {number=} ng:minlength Sets `MINLENGTH` validation error key if the value is shorter than + * @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than * minlength. - * @param {number=} ng:maxlength Sets `MAXLENGTH` validation error key if the value is longer than + * @param {number=} ng-maxlength Sets `MAXLENGTH` validation error key if the value is longer than * maxlength. - * @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the + * @param {string=} ng-pattern Sets `PATTERN` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. - * @param {string=} ng:change Angular expression to be executed when input changes due to user + * @param {string=} ng-change Angular expression to be executed when input changes due to user * interaction with the input element. * * @example @@ -103,12 +103,12 @@ var inputType = { $scope.value = 12; } - - Number: + Number: - + Required! - + Not valid number! value = {{value}}
myForm.input.valid = {{myForm.input.valid}}
@@ -148,17 +148,17 @@ var inputType = { * Text input with URL validation. Sets the `URL` validation error key if the content is not a * valid URL. * - * @param {string} ng:model Assignable angular expression to data-bind to. + * @param {string} ng-model Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the widgets is published. * @param {string=} required Sets `REQUIRED` validation error key if the value is not entered. - * @param {number=} ng:minlength Sets `MINLENGTH` validation error key if the value is shorter than + * @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than * minlength. - * @param {number=} ng:maxlength Sets `MAXLENGTH` validation error key if the value is longer than + * @param {number=} ng-maxlength Sets `MAXLENGTH` validation error key if the value is longer than * maxlength. - * @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the + * @param {string=} ng-pattern Sets `PATTERN` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. - * @param {string=} ng:change Angular expression to be executed when input changes due to user + * @param {string=} ng-change Angular expression to be executed when input changes due to user * interaction with the input element. * * @example @@ -169,11 +169,11 @@ var inputType = { $scope.text = 'http://google.com'; } - - URL: - + + URL: + Required! - + Not valid url! text = {{text}}
myForm.input.valid = {{myForm.input.valid}}
@@ -213,14 +213,14 @@ var inputType = { * Text input with email validation. Sets the `EMAIL` validation error key if not a valid email * address. * - * @param {string} ng:model Assignable angular expression to data-bind to. + * @param {string} ng-model Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the widgets is published. * @param {string=} required Sets `REQUIRED` validation error key if the value is not entered. - * @param {number=} ng:minlength Sets `MINLENGTH` validation error key if the value is shorter than + * @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than * minlength. - * @param {number=} ng:maxlength Sets `MAXLENGTH` validation error key if the value is longer than + * @param {number=} ng-maxlength Sets `MAXLENGTH` validation error key if the value is longer than * maxlength. - * @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the + * @param {string=} ng-pattern Sets `PATTERN` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. * @@ -232,11 +232,11 @@ var inputType = { $scope.text = 'me@example.com'; } - - Email: - + + Email: + Required! - + Not valid email! text = {{text}}
myForm.input.valid = {{myForm.input.valid}}
@@ -275,10 +275,10 @@ var inputType = { * @description * HTML radio button. * - * @param {string} ng:model Assignable angular expression to data-bind to. + * @param {string} ng-model Assignable angular expression to data-bind to. * @param {string} value The value to which the expression should be set when selected. * @param {string=} name Property name of the form under which the widgets is published. - * @param {string=} ng:change Angular expression to be executed when input changes due to user + * @param {string=} ng-change Angular expression to be executed when input changes due to user * interaction with the input element. * * @example @@ -289,10 +289,10 @@ var inputType = { $scope.color = 'blue'; } - - Red
- Green
- Blue
+ + Red
+ Green
+ Blue
color = {{color}}
@@ -316,11 +316,11 @@ var inputType = { * @description * HTML checkbox. * - * @param {string} ng:model Assignable angular expression to data-bind to. + * @param {string} ng-model Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the widgets is published. - * @param {string=} ng:true-value The value to which the expression should be set when selected. - * @param {string=} ng:false-value The value to which the expression should be set when not selected. - * @param {string=} ng:change Angular expression to be executed when input changes due to user + * @param {string=} ng-true-value The value to which the expression should be set when selected. + * @param {string=} ng-false-value The value to which the expression should be set when not selected. + * @param {string=} ng-change Angular expression to be executed when input changes due to user * interaction with the input element. * * @example @@ -332,10 +332,10 @@ var inputType = { $scope.value2 = 'YES' } -
- Value1:
- Value2:
+ + Value1:
+ Value2:
value1 = {{value1}}
value2 = {{value2}}
@@ -607,17 +607,17 @@ function checkboxInputType(scope, element, attr, ctrl) { * properties of this element are exactly the same as those of the * {@link angular.module.ng.$compileProvider.directive.input input element}. * - * @param {string} ng:model Assignable angular expression to data-bind to. + * @param {string} ng-model Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the widgets is published. * @param {string=} required Sets `REQUIRED` validation error key if the value is not entered. - * @param {number=} ng:minlength Sets `MINLENGTH` validation error key if the value is shorter than + * @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than * minlength. - * @param {number=} ng:maxlength Sets `MAXLENGTH` validation error key if the value is longer than + * @param {number=} ng-maxlength Sets `MAXLENGTH` validation error key if the value is longer than * maxlength. - * @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the + * @param {string=} ng-pattern Sets `PATTERN` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. - * @param {string=} ng:change Angular expression to be executed when input changes due to user + * @param {string=} ng-change Angular expression to be executed when input changes due to user * interaction with the input element. */ @@ -630,17 +630,17 @@ function checkboxInputType(scope, element, attr, ctrl) { * HTML input element widget with angular data-binding. Input widget follows HTML5 input types * and polyfills the HTML5 validation behavior for older browsers. * - * @param {string} ng:model Assignable angular expression to data-bind to. + * @param {string} ng-model Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the widgets is published. * @param {string=} required Sets `REQUIRED` validation error key if the value is not entered. - * @param {number=} ng:minlength Sets `MINLENGTH` validation error key if the value is shorter than + * @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than * minlength. - * @param {number=} ng:maxlength Sets `MAXLENGTH` validation error key if the value is longer than + * @param {number=} ng-maxlength Sets `MAXLENGTH` validation error key if the value is longer than * maxlength. - * @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the + * @param {string=} ng-pattern Sets `PATTERN` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. - * @param {string=} ng:change Angular expression to be executed when input changes due to user + * @param {string=} ng-change Angular expression to be executed when input changes due to user * interaction with the input element. * * @example @@ -651,16 +651,16 @@ function checkboxInputType(scope, element, attr, ctrl) { $scope.user = {name: 'guest', last: 'visitor'}; } -
+
- User name: - + User name: + Required!
- Last name: - + Last name: + Too short! - + Too long!

@@ -730,7 +730,7 @@ var inputDirective = [function() { /** * @ngdoc object - * @name angular.module.ng.$compileProvider.directive.ng:model.NgModelController + * @name angular.module.ng.$compileProvider.directive.ng-model.NgModelController * * @property {string} viewValue Actual string value in the view. * @property {*} modelValue The value in the model, that the widget is bound to. @@ -767,8 +767,8 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', /** * @ngdoc function - * @name angular.module.ng.$compileProvider.directive.ng:model.NgModelController#touch - * @methodOf angular.module.ng.$compileProvider.directive.ng:model.NgModelController + * @name angular.module.ng.$compileProvider.directive.ng-model.NgModelController#touch + * @methodOf angular.module.ng.$compileProvider.directive.ng-model.NgModelController * * @return {boolean} Whether it did change state. * @@ -795,8 +795,8 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', /** * @ngdoc function - * @name angular.module.ng.$compileProvider.directive.ng:model.NgModelController#setValidity - * @methodOf angular.module.ng.$compileProvider.directive.ng:model.NgModelController + * @name angular.module.ng.$compileProvider.directive.ng-model.NgModelController#setValidity + * @methodOf angular.module.ng.$compileProvider.directive.ng-model.NgModelController * * @description * Change the validity state, and notifies the form when the widget changes validity. (i.e. does @@ -830,8 +830,8 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', /** * @ngdoc function - * @name angular.module.ng.$compileProvider.directive.ng:model.NgModelController#read - * @methodOf angular.module.ng.$compileProvider.directive.ng:model.NgModelController + * @name angular.module.ng.$compileProvider.directive.ng-model.NgModelController#read + * @methodOf angular.module.ng.$compileProvider.directive.ng-model.NgModelController * * @description * Read a value from view. @@ -886,15 +886,15 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:model + * @name angular.module.ng.$compileProvider.directive.ng-model * * @element input * * @description * Is directive that tells Angular to do two-way data binding. It works together with `input`, - * `select`, `textarea`. You can easily write your own directives to use `ng:model` as well. + * `select`, `textarea`. You can easily write your own directives to use `ng-model` as well. * - * `ng:model` is responsible for: + * `ng-model` is responsible for: * * - binding the view into the model, which other directives such as `input`, `textarea` or `select` * require, @@ -903,7 +903,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', * - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`), * - register the widget with parent {@link angular.module.ng.$compileProvider.directive.form form}. * - * For basic examples, how to use `ng:model`, see: + * For basic examples, how to use `ng-model`, see: * * - {@link angular.module.ng.$compileProvider.directive.input input} * - {@link angular.module.ng.$compileProvider.directive.input.text text} @@ -945,13 +945,13 @@ var ngModelDirective = [function() { /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:change + * @name angular.module.ng.$compileProvider.directive.ng-change * * @description * Evaluate given expression when user changes the input. * The expression is not evaluated when the value change is coming from the model. * - * Note, this directive requires `ng:model` to be present. + * Note, this directive requires `ng-model` to be present. * * @element input * @@ -966,9 +966,9 @@ var ngModelDirective = [function() { * }; * } * - *
- * - * + *
+ * + * *
* debug = {{confirmed}}
* counter = {{counter}} @@ -1002,22 +1002,22 @@ var ngChangeDirective = valueFn({ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:model-instant + * @name angular.module.ng.$compileProvider.directive.ng-model-instant * * @element input * * @description * By default, Angular udpates the model only on `blur` event - when the input looses focus. - * If you want to update after every key stroke, use `ng:model-instant`. + * If you want to update after every key stroke, use `ng-model-instant`. * * @example * * - * First name:
- * Last name:
+ * First name:
+ * Last name:
* * First name ({{firstName}}) is only updated on `blur` event, but the last name ({{lastName}}) - * is updated immediately, because of using `ng:model-instant`. + * is updated immediately, because of using `ng-model-instant`. *
* * it('should update first name on blur', function() { @@ -1099,7 +1099,7 @@ var requiredDirective = [function() { /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:list + * @name angular.module.ng.$compileProvider.directive.ng-list * * @description * Text input that converts between comma-seperated string into an array of strings. @@ -1114,9 +1114,9 @@ var requiredDirective = [function() { $scope.names = ['igor', 'misko', 'vojta']; } -
- List: - + + List: + Required! names = {{names}}
myForm.input.valid = {{myForm.input.valid}}
diff --git a/src/directive/ngBind.js b/src/directive/ngBind.js index 37fabb94..4f443328 100644 --- a/src/directive/ngBind.js +++ b/src/directive/ngBind.js @@ -2,16 +2,16 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:bind + * @name angular.module.ng.$compileProvider.directive.ng-bind * * @description - * The `ng:bind` attribute tells Angular to replace the text content of the specified HTML element + * The `ng-bind` attribute tells Angular to replace the text content of the specified HTML element * with the value of a given expression, and to update the text content when the value of that * expression changes. * - * Typically, you don't use `ng:bind` directly, but instead you use the double curly markup like + * Typically, you don't use `ng-bind` directly, but instead you use the double curly markup like * `{{ expression }}` and let the Angular compiler transform it to - * `` when the template is compiled. + * `` when the template is compiled. * * @element ANY * @param {expression} expression {@link guide/dev_guide.expressions Expression} to evaluate. @@ -25,13 +25,13 @@ $scope.name = 'Whirled'; } -
- Enter name:
- Hello ! +
+ Enter name:
+ Hello !
- it('should check ng:bind', function() { + it('should check ng-bind', function() { expect(using('.doc-example-live').binding('name')).toBe('Whirled'); using('.doc-example-live').input('name').enter('world'); expect(using('.doc-example-live').binding('name')).toBe('world'); @@ -49,12 +49,12 @@ var ngBindDirective = ngDirective(function(scope, element, attr) { /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:bind-html-unsafe + * @name angular.module.ng.$compileProvider.directive.ng-bind-html-unsafe * * @description * Creates a binding that will innerHTML the result of evaluating the `expression` into the current * element. *The innerHTML-ed content will not be sanitized!* You should use this directive only if - * {@link angular.module.ng.$compileProvider.directive.ng:bind-html ng:bind-html} directive is too + * {@link angular.module.ng.$compileProvider.directive.ng-bind-html ng-bind-html} directive is too * restrictive and when you absolutely trust the source of the content you are binding to. * * See {@link angular.module.ng.$sanitize $sanitize} docs for examples. @@ -72,7 +72,7 @@ var ngBindHtmlUnsafeDirective = ngDirective(function(scope, element, attr) { /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:bind-html + * @name angular.module.ng.$compileProvider.directive.ng-bind-html * * @description * Creates a binding that will sanitize the result of evaluating the `expression` with the @@ -98,12 +98,12 @@ var ngBindHtmlDirective = ['$sanitize', function($sanitize) { /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:bind-template + * @name angular.module.ng.$compileProvider.directive.ng-bind-template * * @description - * The `ng:bind-template` attribute specifies that the element - * text should be replaced with the template in ng:bind-template. - * Unlike ng:bind the ng:bind-template can contain multiple `{{` `}}` + * The `ng-bind-template` attribute specifies that the element + * text should be replaced with the template in ng-bind-template. + * Unlike ng-bind the ng-bind-template can contain multiple `{{` `}}` * expressions. (This is required since some HTML elements * can not have SPAN elements such as TITLE, or OPTION to name a few.) * @@ -121,14 +121,14 @@ var ngBindHtmlDirective = ['$sanitize', function($sanitize) { $scope.name = 'World'; } -
- Salutation:
- Name:
-

+       
+ Salutation:
+ Name:
+

        
- it('should check ng:bind', function() { + it('should check ng-bind', function() { expect(using('.doc-example-live').binding('salutation')). toBe('Hello'); expect(using('.doc-example-live').binding('name')). @@ -157,23 +157,23 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) { /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:bind-attr + * @name angular.module.ng.$compileProvider.directive.ng-bind-attr * * @description - * The `ng:bind-attr` attribute specifies that a + * The `ng-bind-attr` attribute specifies that a * {@link guide/dev_guide.templates.databinding databinding} should be created between a particular - * element attribute and a given expression. Unlike `ng:bind`, the `ng:bind-attr` contains one or + * element attribute and a given expression. Unlike `ng-bind`, the `ng-bind-attr` contains one or * more JSON key value pairs; each pair specifies an attribute and the * {@link guide/dev_guide.expressions expression} to which it will be mapped. * - * Instead of writing `ng:bind-attr` statements in your HTML, you can use double-curly markup to - * specify an {{expression}} for the value of an attribute. + * Instead of writing `ng-bind-attr` statements in your HTML, you can use double-curly markup to + * specify an {{expression}} for the value of an attribute. * At compile time, the attribute is translated into an - * ``. + * ``. * - * The following HTML snippet shows how to specify `ng:bind-attr`: + * The following HTML snippet shows how to specify `ng-bind-attr`: *
- *   Google
+ *   Google
  * 
* * This is cumbersome, so as we mentioned using double-curly markup is a prefered way of creating @@ -182,10 +182,10 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) { * Google *
* - * During compilation, the template with attribute markup gets translated to the ng:bind-attr form + * During compilation, the template with attribute markup gets translated to the ng-bind-attr form * mentioned above. * - * _Note_: You might want to consider using {@link angular.module.ng.$compileProvider.directive.ng:href ng:href} instead of + * _Note_: You might want to consider using {@link angular.module.ng.$compileProvider.directive.ng-href ng-href} instead of * `href` if the binding is present in the main application template (`index.html`) and you want to * make sure that a user is not capable of clicking on raw/uncompiled link. * @@ -195,7 +195,7 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) { * the attributes to replace with expressions. Each key matches an attribute * which needs to be replaced. Each value is a text template of * the attribute with the embedded - * {{expression}}s. Any number of + * {{expression}}s. Any number of * key-value pairs can be specified. * * @example @@ -207,18 +207,18 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) { $scope.query = 'AngularJS'; } -
+
Google for: - - + + Google - (ng:bind-attr) | + (ng-bind-attr) | Google (curly binding in attribute val)
- it('should check ng:bind-attr', function() { + it('should check ng-bind-attr', function() { expect(using('.doc-example-live').element('a').attr('href')). toBe('http://www.google.com/search?q=AngularJS'); using('.doc-example-live').input('query').enter('google'); diff --git a/src/directive/ngClass.js b/src/directive/ngClass.js index 2016d04f..903625e6 100644 --- a/src/directive/ngClass.js +++ b/src/directive/ngClass.js @@ -19,10 +19,10 @@ function classDirective(name, selector) { /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:class + * @name angular.module.ng.$compileProvider.directive.ng-class * * @description - * The `ng:class` allows you to set CSS class on HTML element dynamically by databinding an + * The `ng-class` allows you to set CSS class on HTML element dynamically by databinding an * expression that represents all classes to be added. * * The directive won't add duplicate classes if a particular class was already set. @@ -38,13 +38,13 @@ function classDirective(name, selector) { * @example - - + +
- Sample Text      + Sample Text     
- it('should check ng:class', function() { + it('should check ng-class', function() { expect(element('.doc-example-live span').prop('className')).not(). toMatch(/ng-invalid/); @@ -65,15 +65,15 @@ var ngClassDirective = classDirective('', true); /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:class-odd + * @name angular.module.ng.$compileProvider.directive.ng-class-odd * * @description - * The `ng:class-odd` and `ng:class-even` works exactly as - * {@link angular.module.ng.$compileProvider.directive.ng:class ng:class}, except it works in conjunction with `ng:repeat` and + * The `ng-class-odd` and `ng-class-even` works exactly as + * {@link angular.module.ng.$compileProvider.directive.ng-class ng-class}, except it works in conjunction with `ng-repeat` and * takes affect only on odd (even) rows. * * This directive can be applied only within a scope of an - * {@link angular.module.ng.$compileProvider.directive.ng:repeat ng:repeat}. + * {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat}. * * @element ANY * @param {expression} expression {@link guide/dev_guide.expressions Expression} to eval. The result @@ -82,17 +82,17 @@ var ngClassDirective = classDirective('', true); * @example -
    -
  1. - +
      +
    1. + {{name}}      
    - it('should check ng:class-odd and ng:class-even', function() { + it('should check ng-class-odd and ng-class-even', function() { expect(element('.doc-example-live li:first span').prop('className')). toMatch(/ng-format-negative/); expect(element('.doc-example-live li:last span').prop('className')). @@ -105,15 +105,15 @@ var ngClassOddDirective = classDirective('Odd', 0); /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:class-even + * @name angular.module.ng.$compileProvider.directive.ng-class-even * * @description - * The `ng:class-odd` and `ng:class-even` works exactly as - * {@link angular.module.ng.$compileProvider.directive.ng:class ng:class}, except it works in conjunction with `ng:repeat` and + * The `ng-class-odd` and `ng-class-even` works exactly as + * {@link angular.module.ng.$compileProvider.directive.ng-class ng-class}, except it works in conjunction with `ng-repeat` and * takes affect only on odd (even) rows. * * This directive can be applied only within a scope of an - * {@link angular.module.ng.$compileProvider.directive.ng:repeat ng:repeat}. + * {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat}. * * @element ANY * @param {expression} expression {@link guide/dev_guide.expressions Expression} to eval. The result @@ -122,16 +122,16 @@ var ngClassOddDirective = classDirective('Odd', 0); * @example -
      -
    1. - +
        +
      1. + {{name}}      
      - it('should check ng:class-odd and ng:class-even', function() { + it('should check ng-class-odd and ng-class-even', function() { expect(element('.doc-example-live li:first span').prop('className')). toMatch(/odd/); expect(element('.doc-example-live li:last span').prop('className')). diff --git a/src/directive/ngCloak.js b/src/directive/ngCloak.js index b4fe6708..7422e15a 100644 --- a/src/directive/ngCloak.js +++ b/src/directive/ngCloak.js @@ -2,17 +2,17 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:cloak + * @name angular.module.ng.$compileProvider.directive.ng-cloak * * @description - * The `ng:cloak` directive is used to prevent the Angular html template from being briefly + * The `ng-cloak` directive is used to prevent the Angular html template from being briefly * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this * directive to avoid the undesirable flicker effect caused by the html template display. * * The directive can be applied to the `` element, but typically a fine-grained application is * prefered in order to benefit from progressive rendering of the browser view. * - * `ng:cloak` works in cooperation with a css rule that is embedded within `angular.js` and + * `ng-cloak` works in cooperation with a css rule that is embedded within `angular.js` and * `angular.min.js` files. Following is the css rule: * *
      @@ -22,8 +22,8 @@
        * 
      * * When this css rule is loaded by the browser, all html elements (including their children) that - * are tagged with the `ng:cloak` directive are hidden. When Angular comes across this directive - * during the compilation of the template it deletes the `ng:cloak` element attribute, which + * are tagged with the `ng-cloak` directive are hidden. When Angular comes across this directive + * during the compilation of the template it deletes the `ng-cloak` element attribute, which * makes the compiled element visible. * * For the best result, `angular.js` script must be loaded in the head section of the html file; @@ -32,21 +32,21 @@ * * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they * cannot match the `[ng\:cloak]` selector. To work around this limitation, you must add the css - * class `ng-cloak` in addition to `ng:cloak` directive as shown in the example below. + * class `ng-cloak` in addition to `ng-cloak` directive as shown in the example below. * * @element ANY * * @example -
      {{ 'hello' }}
      -
      {{ 'hello IE7' }}
      +
      {{ 'hello' }}
      +
      {{ 'hello IE7' }}
      it('should remove the template directive and css class', function() { - expect(element('.doc-example-live #template1').attr('ng:cloak')). + expect(element('.doc-example-live #template1').attr('ng-cloak')). not().toBeDefined(); - expect(element('.doc-example-live #template2').attr('ng:cloak')). + expect(element('.doc-example-live #template2').attr('ng-cloak')). not().toBeDefined(); }); diff --git a/src/directive/ngController.js b/src/directive/ngController.js index e17a97cd..7dd90f48 100644 --- a/src/directive/ngController.js +++ b/src/directive/ngController.js @@ -2,17 +2,17 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:controller + * @name angular.module.ng.$compileProvider.directive.ng-controller * * @description - * The `ng:controller` directive assigns behavior to a scope. This is a key aspect of how angular + * The `ng-controller` directive assigns behavior to a scope. This is a key aspect of how angular * supports the principles behind the Model-View-Controller design pattern. * * MVC components in angular: * * * Model — The Model is data in scope properties; scopes are attached to the DOM. * * View — The template (HTML with data bindings) is rendered into the View. - * * Controller — The `ng:controller` directive specifies a Controller class; the class has + * * Controller — The `ng-controller` directive specifies a Controller class; the class has * methods that typically express the business logic behind the application. * * Note that an alternative way to define controllers is via the `{@link angular.module.ng.$route}` @@ -59,21 +59,21 @@ }; } -
      - Name: - [ greet ]
      +
      + Name: + [ greet ]
      Contact:
      diff --git a/src/directive/ngEventDirs.js b/src/directive/ngEventDirs.js index 0815229d..9563ee22 100644 --- a/src/directive/ngEventDirs.js +++ b/src/directive/ngEventDirs.js @@ -2,10 +2,10 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:click + * @name angular.module.ng.$compileProvider.directive.ng-click * * @description - * The ng:click allows you to specify custom behavior when + * The ng-click allows you to specify custom behavior when * element is clicked. * * @element ANY @@ -15,13 +15,13 @@ * @example - count: {{count}} - it('should check ng:click', function() { + it('should check ng-click', function() { expect(binding('count')).toBe('0'); element('.doc-example-live :button').click(); expect(binding('count')).toBe('1'); @@ -55,39 +55,39 @@ forEach( /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:dblclick + * @name angular.module.ng.$compileProvider.directive.ng-dblclick * * @description - * The ng:dblclick allows you to specify custom behavior on dblclick event. + * The ng-dblclick allows you to specify custom behavior on dblclick event. * * @element ANY * @param {expression} expression {@link guide/dev_guide.expressions Expression} to evaluate upon * dblclick. (Event object is available as `$event`) * * @example - * See {@link angular.module.ng.$compileProvider.directive.ng:click ng:click} + * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} */ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:mousedown + * @name angular.module.ng.$compileProvider.directive.ng-mousedown * * @description - * The ng:mousedown allows you to specify custom behavior on mousedown event. + * The ng-mousedown allows you to specify custom behavior on mousedown event. * * @element ANY * @param {expression} expression {@link guide/dev_guide.expressions Expression} to evaluate upon * mousedown. (Event object is available as `$event`) * * @example - * See {@link angular.module.ng.$compileProvider.directive.ng:click ng:click} + * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} */ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:mouseup + * @name angular.module.ng.$compileProvider.directive.ng-mouseup * * @description * Specify custom behavior on mouseup event. @@ -97,12 +97,12 @@ forEach( * mouseup. (Event object is available as `$event`) * * @example - * See {@link angular.module.ng.$compileProvider.directive.ng:click ng:click} + * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} */ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:mouseover + * @name angular.module.ng.$compileProvider.directive.ng-mouseover * * @description * Specify custom behavior on mouseover event. @@ -112,13 +112,13 @@ forEach( * mouseover. (Event object is available as `$event`) * * @example - * See {@link angular.module.ng.$compileProvider.directive.ng:click ng:click} + * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} */ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:mouseenter + * @name angular.module.ng.$compileProvider.directive.ng-mouseenter * * @description * Specify custom behavior on mouseenter event. @@ -128,13 +128,13 @@ forEach( * mouseenter. (Event object is available as `$event`) * * @example - * See {@link angular.module.ng.$compileProvider.directive.ng:click ng:click} + * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} */ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:mouseleave + * @name angular.module.ng.$compileProvider.directive.ng-mouseleave * * @description * Specify custom behavior on mouseleave event. @@ -144,13 +144,13 @@ forEach( * mouseleave. (Event object is available as `$event`) * * @example - * See {@link angular.module.ng.$compileProvider.directive.ng:click ng:click} + * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} */ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:mousemove + * @name angular.module.ng.$compileProvider.directive.ng-mousemove * * @description * Specify custom behavior on mousemove event. @@ -160,13 +160,13 @@ forEach( * mousemove. (Event object is available as `$event`) * * @example - * See {@link angular.module.ng.$compileProvider.directive.ng:click ng:click} + * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} */ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:submit + * @name angular.module.ng.$compileProvider.directive.ng-submit * * @description * Enables binding angular expressions to onsubmit events. @@ -192,15 +192,15 @@ forEach( }; } - + Enter text and hit enter: - +
      list={{list}}
      - it('should check ng:submit', function() { + it('should check ng-submit', function() { expect(binding('list')).toBe('[]'); element('.doc-example-live #submit').click(); expect(binding('list')).toBe('["hello"]'); diff --git a/src/directive/ngInclude.js b/src/directive/ngInclude.js index 68a03d35..297de966 100644 --- a/src/directive/ngInclude.js +++ b/src/directive/ngInclude.js @@ -2,14 +2,14 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:include + * @name angular.module.ng.$compileProvider.directive.ng-include * @restrict EA * * @description * Fetches, compiles and includes an external HTML fragment. * * Keep in mind that Same Origin Policy applies to included resources - * (e.g. ng:include won't work for file:// access). + * (e.g. ng-include won't work for file:// access). * * @scope * @@ -19,7 +19,7 @@ * instance of angular.module.ng.$rootScope.Scope to set the HTML fragment to. * @param {string=} onload Expression to evaluate when a new partial is loaded. * - * @param {string=} autoscroll Whether `ng:include` should call {@link angular.module.ng.$anchorScroll + * @param {string=} autoscroll Whether `ng-include` should call {@link angular.module.ng.$anchorScroll * $anchorScroll} to scroll the viewport after the content is loaded. * * - If the attribute is not set, disable scrolling. @@ -37,8 +37,8 @@ $scope.template = $scope.templates[0]; } -
      - url of the template: {{template.url}} @@ -67,11 +67,11 @@ /** * @ngdoc event - * @name angular.module.ng.$compileProvider.directive.ng:include#$includeContentLoaded - * @eventOf angular.module.ng.$compileProvider.directive.ng:include - * @eventType emit on the current ng:include scope + * @name angular.module.ng.$compileProvider.directive.ng-include#$includeContentLoaded + * @eventOf angular.module.ng.$compileProvider.directive.ng-include + * @eventType emit on the current ng-include scope * @description - * Emitted every time the ng:include content is reloaded. + * Emitted every time the ng-include content is reloaded. */ var ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$compile', function($http, $templateCache, $anchorScroll, $compile) { diff --git a/src/directive/ngInit.js b/src/directive/ngInit.js index cdab1cdb..644fec6a 100644 --- a/src/directive/ngInit.js +++ b/src/directive/ngInit.js @@ -2,10 +2,10 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:init + * @name angular.module.ng.$compileProvider.directive.ng-init * * @description - * The `ng:init` attribute specifies initialization tasks to be executed + * The `ng-init` attribute specifies initialization tasks to be executed * before the template enters execution mode during bootstrap. * * @element ANY @@ -14,7 +14,7 @@ * @example -
      +
      {{greeting}} {{person}}!
      diff --git a/src/directive/ngNonBindable.js b/src/directive/ngNonBindable.js index b9857afa..e89b0685 100644 --- a/src/directive/ngNonBindable.js +++ b/src/directive/ngNonBindable.js @@ -2,28 +2,28 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:non-bindable + * @name angular.module.ng.$compileProvider.directive.ng-non-bindable * * @description * Sometimes it is necessary to write code which looks like bindings but which should be left alone - * by angular. Use `ng:non-bindable` to make angular ignore a chunk of HTML. + * by angular. Use `ng-non-bindable` to make angular ignore a chunk of HTML. * - * Note: `ng:non-bindable` looks like a directive, but is actually an attribute widget. + * Note: `ng-non-bindable` looks like a directive, but is actually an attribute widget. * * @element ANY * * @example * In this example there are two location where a simple binding (`{{}}`) is present, but the one - * wrapped in `ng:non-bindable` is left alone. + * wrapped in `ng-non-bindable` is left alone. * * @example
      Normal: {{1 + 2}}
      -
      Ignored: {{1 + 2}}
      +
      Ignored: {{1 + 2}}
      - it('should check ng:non-bindable', function() { + it('should check ng-non-bindable', function() { expect(using('.doc-example-live').binding('1 + 2')).toBe('3'); expect(using('.doc-example-live').element('div:last').text()). toMatch(/1 \+ 2/); diff --git a/src/directive/ngPluralize.js b/src/directive/ngPluralize.js index 4a6f4a7e..d462909d 100644 --- a/src/directive/ngPluralize.js +++ b/src/directive/ngPluralize.js @@ -2,14 +2,14 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:pluralize + * @name angular.module.ng.$compileProvider.directive.ng-pluralize * @restrict EA * * @description * # Overview - * ng:pluralize is a widget that displays messages according to en-US localization rules. + * ng-pluralize is a widget that displays messages according to en-US localization rules. * These rules are bundled with angular.js and the rules can be overridden - * (see {@link guide/dev_guide.i18n Angular i18n} dev guide). You configure ng:pluralize by + * (see {@link guide/dev_guide.i18n Angular i18n} dev guide). You configure ng-pluralize by * specifying the mappings between * {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html * plural categories} and the strings to be displayed. @@ -24,8 +24,8 @@ * explicit number rule for "3" matches the number 3. You will see the use of plural categories * and explicit number rules throughout later parts of this documentation. * - * # Configuring ng:pluralize - * You configure ng:pluralize by providing 2 attributes: `count` and `when`. + * # Configuring ng-pluralize + * You configure ng-pluralize by providing 2 attributes: `count` and `when`. * You can also provide an optional attribute, `offset`. * * The value of the `count` attribute can be either a string or an {@link guide/dev_guide.expressions @@ -35,14 +35,14 @@ * string to be displayed. The value of the attribute should be a JSON object so that Angular * can interpret it correctly. * - * The following example shows how to configure ng:pluralize: + * The following example shows how to configure ng-pluralize: * *
      - * 
      - * 
      + * 
        *
      * * In the example, `"0: Nobody is viewing."` is an explicit number rule. If you did not @@ -53,10 +53,10 @@ * * You can use a set of closed braces(`{}`) as a placeholder for the number that you want substituted * into pluralized strings. In the previous example, Angular will replace `{}` with - * `{{personCount}}`. The closed braces `{}` is a placeholder - * for {{numberExpression}}. + * `{{personCount}}`. The closed braces `{}` is a placeholder + * for {{numberExpression}}. * - * # Configuring ng:pluralize with offset + * # Configuring ng-pluralize with offset * The `offset` attribute allows further customization of pluralized text, which can result in * a better user experience. For example, instead of the message "4 people are viewing this document", * you might display "John, Kate and 2 others are viewing this document". @@ -64,13 +64,13 @@ * Let's take a look at an example: * *
      - * 
      - * 
      + * 
        * 
      * * Notice that we are still using two plural categories(one, other), but we added @@ -100,10 +100,10 @@ $scope.personCount = 1; } -
      - Person 1:
      - Person 2:
      - Number of People:
      +
      + Person 1:
      + Person 2:
      + Number of People:
      Without Offset: diff --git a/src/directive/ngRepeat.js b/src/directive/ngRepeat.js index 7cab7c40..7e7aef60 100644 --- a/src/directive/ngRepeat.js +++ b/src/directive/ngRepeat.js @@ -2,10 +2,10 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:repeat + * @name angular.module.ng.$compileProvider.directive.ng-repeat * * @description - * The `ng:repeat` widget instantiates a template once per item from a collection. Each template + * The `ng-repeat` widget instantiates a template once per item from a collection. Each template * instance gets its own scope, where the given loop variable is set to the current collection item, * and `$index` is set to the item index or key. * @@ -17,7 +17,7 @@ * * `'middle'` * * `'last'` * - * Note: Although `ng:repeat` looks like a directive, it is actually an attribute widget. + * Note: Although `ng-repeat` looks like a directive, it is actually an attribute widget. * * @element ANY * @scope @@ -37,20 +37,20 @@ * * @example * This example initializes the scope to a list of names and - * then uses `ng:repeat` to display every person: + * then uses `ng-repeat` to display every person: -
      +
      I have {{friends.length}} friends. They are:
        -
      • +
      • [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.
      - it('should check ng:repeat', function() { + it('should check ng-repeat', function() { var r = using('.doc-example-live').repeater('ul li'); expect(r.count()).toBe(2); expect(r.row(0)).toEqual(["1","John","25"]); @@ -69,7 +69,7 @@ var ngRepeatDirective = ngDirective({ var match = expression.match(/^\s*(.+)\s+in\s+(.*)\s*$/), lhs, rhs, valueIdent, keyIdent; if (! match) { - throw Error("Expected ng:repeat in form of '_item_ in _collection_' but got '" + + throw Error("Expected ng-repeat in form of '_item_ in _collection_' but got '" + expression + "'."); } lhs = match[1]; diff --git a/src/directive/ngShowHide.js b/src/directive/ngShowHide.js index 0060ec80..ee3a17d9 100644 --- a/src/directive/ngShowHide.js +++ b/src/directive/ngShowHide.js @@ -2,10 +2,10 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:show + * @name angular.module.ng.$compileProvider.directive.ng-show * * @description - * The `ng:show` and `ng:hide` directives show or hide a portion of the DOM tree (HTML) + * The `ng-show` and `ng-hide` directives show or hide a portion of the DOM tree (HTML) * conditionally. * * @element ANY @@ -15,12 +15,12 @@ * @example - Click me:
      - Show: I show up when your checkbox is checked.
      - Hide: I hide when your checkbox is checked. + Click me:
      + Show: I show up when your checkbox is checked.
      + Hide: I hide when your checkbox is checked.
      - it('should check ng:show / ng:hide', function() { + it('should check ng-show / ng-hide', function() { expect(element('.doc-example-live span:first:hidden').count()).toEqual(1); expect(element('.doc-example-live span:last:visible').count()).toEqual(1); @@ -42,10 +42,10 @@ var ngShowDirective = ngDirective(function(scope, element, attr){ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:hide + * @name angular.module.ng.$compileProvider.directive.ng-hide * * @description - * The `ng:hide` and `ng:show` directives hide or show a portion + * The `ng-hide` and `ng-show` directives hide or show a portion * of the HTML conditionally. * * @element ANY @@ -55,12 +55,12 @@ var ngShowDirective = ngDirective(function(scope, element, attr){ * @example - Click me:
      - Show: I show up when you checkbox is checked?
      - Hide: I hide when you checkbox is checked? + Click me:
      + Show: I show up when you checkbox is checked?
      + Hide: I hide when you checkbox is checked?
      - it('should check ng:show / ng:hide', function() { + it('should check ng-show / ng-hide', function() { expect(element('.doc-example-live span:first:hidden').count()).toEqual(1); expect(element('.doc-example-live span:last:visible').count()).toEqual(1); diff --git a/src/directive/ngStyle.js b/src/directive/ngStyle.js index cd2c1e3c..1dc1ee76 100644 --- a/src/directive/ngStyle.js +++ b/src/directive/ngStyle.js @@ -2,10 +2,10 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:style + * @name angular.module.ng.$compileProvider.directive.ng-style * * @description - * The ng:style allows you to set CSS style on an HTML element conditionally. + * The ng-style allows you to set CSS style on an HTML element conditionally. * * @element ANY * @param {expression} expression {@link guide/dev_guide.expressions Expression} which evals to an @@ -15,14 +15,14 @@ * @example - - + +
      - Sample Text + Sample Text
      myStyle={{myStyle}}
      - it('should check ng:style', function() { + it('should check ng-style', function() { expect(element('.doc-example-live span').css('color')).toBe('rgb(0, 0, 0)'); element('.doc-example-live :button[value=set]').click(); expect(element('.doc-example-live span').css('color')).toBe('rgb(255, 0, 0)'); diff --git a/src/directive/ngSwitch.js b/src/directive/ngSwitch.js index 0b2475f3..a4f5afad 100644 --- a/src/directive/ngSwitch.js +++ b/src/directive/ngSwitch.js @@ -2,26 +2,26 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:switch + * @name angular.module.ng.$compileProvider.directive.ng-switch * @restrict EA * * @description * Conditionally change the DOM structure. * * @usageContent - * ... - * ... + * ... + * ... * ... - * ... + * ... * * @scope - * @param {*} on expression to match against ng:switch-when. + * @param {*} on expression to match against ng-switch-when. * @paramDescription * On child elments add: * - * * `ng:switch-when`: the case statement to match against. If match then this + * * `ng-switch-when`: the case statement to match against. If match then this * case will be displayed. - * * `ng:switch-default`: the default case when no other casses match. + * * `ng-switch-default`: the default case when no other casses match. * * @example @@ -32,29 +32,29 @@ $scope.selection = $scope.items[0]; } -
      - selection={{selection}}
      - -
      Settings Div
      - Home Span - default -
      +
      +
      Settings Div
      + Home Span + default +
      it('should start in settings', function() { - expect(element('.doc-example-live ng\\:switch').text()).toMatch(/Settings Div/); + expect(element('.doc-example-live [ng-switch]').text()).toMatch(/Settings Div/); }); it('should change to home', function() { select('selection').option('home'); - expect(element('.doc-example-live ng\\:switch').text()).toMatch(/Home Span/); + expect(element('.doc-example-live [ng-switch]').text()).toMatch(/Home Span/); }); it('should select deafault', function() { select('selection').option('other'); - expect(element('.doc-example-live ng\\:switch').text()).toMatch(/default/); + expect(element('.doc-example-live [ng-switch]').text()).toMatch(/default/); });
      diff --git a/src/directive/ngTransclude.js b/src/directive/ngTransclude.js index 16587f30..ab4011f0 100644 --- a/src/directive/ngTransclude.js +++ b/src/directive/ngTransclude.js @@ -2,7 +2,7 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:transclude + * @name angular.module.ng.$compileProvider.directive.ng-transclude * * @description * Insert the transcluded DOM here. @@ -32,9 +32,9 @@ }; }); -
      -
      -
      +
      +
      +
      {{text}}
      diff --git a/src/directive/ngView.js b/src/directive/ngView.js index 74528ad9..d5b24bcb 100644 --- a/src/directive/ngView.js +++ b/src/directive/ngView.js @@ -2,12 +2,12 @@ /** * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:view + * @name angular.module.ng.$compileProvider.directive.ng-view * @restrict ECA * * @description * # Overview - * `ng:view` is a directive that complements the {@link angular.module.ng.$route $route} service by + * `ng-view` is a directive that complements the {@link angular.module.ng.$route $route} service by * including the rendered template of the current route into the main layout (`index.html`) file. * Every time the current route changes, the included view changes with it according to the * configuration of the `$route` service. @@ -59,7 +59,7 @@ } -
      +
      Choose: Moby | Moby: Ch1 | @@ -67,7 +67,7 @@ Gatsby: Ch4 | Scarlet Letter
      - +

      $location.path() = {{$location.path()}}
      @@ -80,13 +80,13 @@ it('should load and compile correct template', function() { element('a:contains("Moby: Ch1")').click(); - var content = element('.doc-example-live ng\\:view').text(); + var content = element('.doc-example-live [ng-view]').text(); expect(content).toMatch(/controller\: ChapterCntl/); expect(content).toMatch(/Book Id\: Moby/); expect(content).toMatch(/Chapter Id\: 1/); element('a:contains("Scarlet")').click(); - content = element('.doc-example-live ng\\:view').text(); + content = element('.doc-example-live [ng-view]').text(); expect(content).toMatch(/controller\: BookCntl/); expect(content).toMatch(/Book Id\: Scarlet/); }); @@ -97,11 +97,11 @@ /** * @ngdoc event - * @name angular.module.ng.$compileProvider.directive.ng:view#$viewContentLoaded - * @eventOf angular.module.ng.$compileProvider.directive.ng:view - * @eventType emit on the current ng:view scope + * @name angular.module.ng.$compileProvider.directive.ng-view#$viewContentLoaded + * @eventOf angular.module.ng.$compileProvider.directive.ng-view + * @eventType emit on the current ng-view scope * @description - * Emitted every time the ng:view content is reloaded. + * Emitted every time the ng-view content is reloaded. */ var ngViewDirective = ['$http', '$templateCache', '$route', '$anchorScroll', '$compile', '$controller', diff --git a/src/directive/script.js b/src/directive/script.js index f0affaf9..98e6394a 100644 --- a/src/directive/script.js +++ b/src/directive/script.js @@ -6,7 +6,7 @@ * * @description * Load content of a script tag, with type `text/ng-template`, into `$templateCache`, so that the - * template can be used by `ng:include`, `ng:view` or directive templates. + * template can be used by `ng-include`, `ng-view` or directive templates. * * @restrict E * @@ -17,7 +17,7 @@ Content of the template. - Load inlined template + Load inlined template
      diff --git a/src/directive/select.js b/src/directive/select.js index 5ed1367f..627722ba 100644 --- a/src/directive/select.js +++ b/src/directive/select.js @@ -7,34 +7,34 @@ * @description * HTML `SELECT` element with angular data-binding. * - * # `ng:options` + * # `ng-options` * - * Optionally `ng:options` attribute can be used to dynamically generate a list of `