diff options
65 files changed, 766 insertions, 764 deletions
| diff --git a/docs/src/templates/doc_widgets.js b/docs/src/templates/doc_widgets.js index 32d99926..6407b064 100644 --- a/docs/src/templates/doc_widgets.js +++ b/docs/src/templates/doc_widgets.js @@ -14,7 +14,7 @@ angular.module('ngdocs.directives', [], function($compileProvider) {    var HTML_TEMPLATE =      '<!doctype html>\n' + -    '<html xmlns:ng="http://angularjs.org" ng:app_MODULE_>\n' + +    '<html ng-app_MODULE_>\n' +      ' <script src="' + angularJsUrl + '"></script>\n' +      '_SCRIPT_SOURCE_' +      ' <body>\n' + diff --git a/src/Angular.js b/src/Angular.js index 57c86417..c70373b2 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -445,7 +445,7 @@ function makeMap(str){  /** - * HTML class which is the only class which can be used in ng:bind to inline HTML for security + * HTML class which is the only class which can be used in ng-bind to inline HTML for security   * reasons.   *   * @constructor @@ -831,7 +831,7 @@ function encodeUriQuery(val, pctEncodeSpaces) {  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:app + * @name angular.module.ng.$compileProvider.directive.ng-app   *   * @element ANY   * @param {angular.Module} module on optional application @@ -844,11 +844,11 @@ function encodeUriQuery(val, pctEncodeSpaces) {   * designates the root of the application and is typically placed   * ot the root of the page.   * - * In the example below if the `ng:app` directive would not be placed + * In the example below if the `ng-app` directive would not be placed   * on the `html` element then the document would not be compiled   * and the `{{ 1+2 }}` would not be resolved to `3`.   * - * `ng:app` is the easiest way to bootstrap an application. + * `ng-app` is the easiest way to bootstrap an application.   *   <doc:example>     <doc:source> 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.: - * <a href="" ng:click="model.$save()">Save</a> + * <a href="" ng-click="model.$save()">Save</a>   */  var htmlAnchorDirective = valueFn({    restrict: 'E',    compile: function(element, attr) { -    // turn <a href ng:click="..">link</a> into a link in IE +    // turn <a href ng-click="..">link</a> 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 <angular/> 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:   * <pre> @@ -19,7 +19,7 @@   *   * The correct way to write it:   * <pre> - * <a ng:href="http://www.gravatar.com/avatar/{{hash}}"/> + * <a ng-href="http://www.gravatar.com/avatar/{{hash}}"/>   * </pre>   *   * @element ANY @@ -29,47 +29,47 @@   * This example uses `link` variable inside `href` attribute:      <doc:example>        <doc:source> -        <input ng:model="value" /><br /> -        <a id="link-1" href ng:click="value = 1">link 1</a> (link, don't reload)<br /> -        <a id="link-2" href="" ng:click="value = 2">link 2</a> (link, don't reload)<br /> -        <a id="link-3" ng:href="/{{'123'}}" ng:ext-link>link 3</a> (link, reload!)<br /> -        <a id="link-4" href="" name="xx" ng:click="value = 4">anchor</a> (link, don't reload)<br /> -        <a id="link-5" name="xxx" ng:click="value = 5">anchor</a> (no link)<br /> -        <a id="link-6" ng:href="/{{value}}" ng:ext-link>link</a> (link, change hash) +        <input ng-model="value" /><br /> +        <a id="link-1" href ng-click="value = 1">link 1</a> (link, don't reload)<br /> +        <a id="link-2" href="" ng-click="value = 2">link 2</a> (link, don't reload)<br /> +        <a id="link-3" ng-href="/{{'123'}}" ng-ext-link>link 3</a> (link, reload!)<br /> +        <a id="link-4" href="" name="xx" ng-click="value = 4">anchor</a> (link, don't reload)<br /> +        <a id="link-5" name="xxx" ng-click="value = 5">anchor</a> (no link)<br /> +        <a id="link-6" ng-href="/{{value}}" ng-ext-link>link</a> (link, change hash)        </doc:source>        <doc:scenario> -        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 <angular/> markup like `{{hash}}` in a `src` attribute doesn't   * work right: The browser will fetch from the URL with the literal   * text `{{hash}}` until <angular/> 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:   * <pre> @@ -98,7 +98,7 @@   *   * The correct way to write it:   * <pre> - * <img ng:src="http://www.gravatar.com/avatar/{{hash}}"/> + * <img ng-src="http://www.gravatar.com/avatar/{{hash}}"/>   * </pre>   *   * @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:   * <pre> - * <div ng:init="scope = { isDisabled: false }"> + * <div ng-init="scope = { isDisabled: false }">   *  <button disabled="{{scope.isDisabled}}">Disabled</button>   * </div>   * </pre> @@ -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      <doc:example>        <doc:source> -        Click me to toggle: <input type="checkbox" ng:model="checked"><br/> -        <button ng:model="button" ng:disabled="{{checked}}">Button</button> +        Click me to toggle: <input type="checkbox" ng-model="checked"><br/> +        <button ng-model="button" ng-disabled="{{checked}}">Button</button>        </doc:source>        <doc:scenario>          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      <doc:example>        <doc:source> -        Check me to check both: <input type="checkbox" ng:model="master"><br/> -        <input id="checkSlave" type="checkbox" ng:checked="{{master}}"> +        Check me to check both: <input type="checkbox" ng-model="master"><br/> +        <input id="checkSlave" type="checkbox" ng-checked="{{master}}">        </doc:source>        <doc:scenario>          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       <doc:example>         <doc:source> -         Check me check multiple: <input type="checkbox" ng:model="checked"><br/> -         <select id="select" ng:multiple="{{checked}}"> +         Check me check multiple: <input type="checkbox" ng-model="checked"><br/> +         <select id="select" ng-multiple="{{checked}}">             <option>Misko</option>             <option>Igor</option>             <option>Vojta</option> @@ -209,18 +209,18 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng:readonly + * @name angular.module.ng.$compileProvider.directive.ng-readonly   *   * @description   * The HTML specs do not require browsers to preserve the special attributes such as readonly.   * (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:readonly. + * To solve this problem, we introduce ng-readonly.   * @example      <doc:example>        <doc:source> -        Check me to make text readonly: <input type="checkbox" ng:model="checked"><br/> -        <input type="text" ng:readonly="{{checked}}" value="I'm Angular"/> +        Check me to make text readonly: <input type="checkbox" ng-model="checked"><br/> +        <input type="text" ng-readonly="{{checked}}" value="I'm Angular"/>        </doc:source>        <doc:scenario>          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     <doc:example>       <doc:source> -       Check me to select: <input type="checkbox" ng:model="checked"><br/> +       Check me to select: <input type="checkbox" ng-model="checked"><br/>         <select>           <option>Hello!</option> -         <option id="greet" ng:selected="{{checked}}">Greetings!</option> +         <option id="greet" ng-selected="{{checked}}">Greetings!</option>         </select>       </doc:source>       <doc:scenario> 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 `<form>` elements, for this - * reason angular provides `<ng:form>` alias which behaves identical to `<form>` but allows + * reason angular provides `<ng-form>` alias which behaves identical to `<form>` 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';           }         </script> -       <form name="myForm" ng:controller="Ctrl"> -         text: <input type="text" name="input" ng:model="text" required> -         <span class="error" ng:show="myForm.input.error.REQUIRED">Required!</span> +       <form name="myForm" ng-controller="Ctrl"> +         text: <input type="text" name="input" ng-model="text" required> +         <span class="error" ng-show="myForm.input.error.REQUIRED">Required!</span>           <tt>text = {{text}}</tt><br/>           <tt>myForm.input.valid = {{myForm.input.valid}}</tt><br/>           <tt>myForm.input.error = {{myForm.input.error}}</tt><br/> 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*$/;             }           </script> -         <form name="myForm" ng:controller="Ctrl"> -           Single word: <input type="text" name="input" ng:model="text" -                               ng:pattern="word" required> -           <span class="error" ng:show="myForm.input.error.REQUIRED"> +         <form name="myForm" ng-controller="Ctrl"> +           Single word: <input type="text" name="input" ng-model="text" +                               ng-pattern="word" required> +           <span class="error" ng-show="myForm.input.error.REQUIRED">               Required!</span> -           <span class="error" ng:show="myForm.input.error.PATTERN"> +           <span class="error" ng-show="myForm.input.error.PATTERN">               Single word only!</span>             <tt>text = {{text}}</tt><br/> @@ -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;             }           </script> -         <form name="myForm" ng:controller="Ctrl"> -           Number: <input type="number" name="input" ng:model="value" +         <form name="myForm" ng-controller="Ctrl"> +           Number: <input type="number" name="input" ng-model="value"                            min="0" max="99" required> -           <span class="error" ng:show="myForm.list.error.REQUIRED"> +           <span class="error" ng-show="myForm.list.error.REQUIRED">               Required!</span> -           <span class="error" ng:show="myForm.list.error.NUMBER"> +           <span class="error" ng-show="myForm.list.error.NUMBER">               Not valid number!</span>             <tt>value = {{value}}</tt><br/>             <tt>myForm.input.valid = {{myForm.input.valid}}</tt><br/> @@ -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';             }           </script> -         <form name="myForm" ng:controller="Ctrl"> -           URL: <input type="url" name="input" ng:model="text" required> -           <span class="error" ng:show="myForm.input.error.REQUIRED"> +         <form name="myForm" ng-controller="Ctrl"> +           URL: <input type="url" name="input" ng-model="text" required> +           <span class="error" ng-show="myForm.input.error.REQUIRED">               Required!</span> -           <span class="error" ng:show="myForm.input.error.url"> +           <span class="error" ng-show="myForm.input.error.url">               Not valid url!</span>             <tt>text = {{text}}</tt><br/>             <tt>myForm.input.valid = {{myForm.input.valid}}</tt><br/> @@ -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';             }           </script> -           <form name="myForm" ng:controller="Ctrl"> -             Email: <input type="email" name="input" ng:model="text" required> -             <span class="error" ng:show="myForm.input.error.REQUIRED"> +           <form name="myForm" ng-controller="Ctrl"> +             Email: <input type="email" name="input" ng-model="text" required> +             <span class="error" ng-show="myForm.input.error.REQUIRED">                 Required!</span> -             <span class="error" ng:show="myForm.input.error.EMAIL"> +             <span class="error" ng-show="myForm.input.error.EMAIL">                 Not valid email!</span>               <tt>text = {{text}}</tt><br/>               <tt>myForm.input.valid = {{myForm.input.valid}}</tt><br/> @@ -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';             }           </script> -         <form name="myForm" ng:controller="Ctrl"> -           <input type="radio" ng:model="color" value="red">  Red <br/> -           <input type="radio" ng:model="color" value="green"> Green <br/> -           <input type="radio" ng:model="color" value="blue"> Blue <br/> +         <form name="myForm" ng-controller="Ctrl"> +           <input type="radio" ng-model="color" value="red">  Red <br/> +           <input type="radio" ng-model="color" value="green"> Green <br/> +           <input type="radio" ng-model="color" value="blue"> Blue <br/>             <tt>color = {{color}}</tt><br/>            </form>          </doc:source> @@ -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'             }           </script> -         <form name="myForm" ng:controller="Ctrl"> -           Value1: <input type="checkbox" ng:model="value1"> <br/> -           Value2: <input type="checkbox" ng:model="value2" -                          ng:true-value="YES" ng:false-value="NO"> <br/> +         <form name="myForm" ng-controller="Ctrl"> +           Value1: <input type="checkbox" ng-model="value1"> <br/> +           Value2: <input type="checkbox" ng-model="value2" +                          ng-true-value="YES" ng-false-value="NO"> <br/>             <tt>value1 = {{value1}}</tt><br/>             <tt>value2 = {{value2}}</tt><br/>            </form> @@ -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'};           }         </script> -       <div ng:controller="Ctrl"> +       <div ng-controller="Ctrl">           <form name="myForm"> -           User name: <input type="text" name="userName" ng:model="user.name" required> -           <span class="error" ng:show="myForm.userName.error.REQUIRED"> +           User name: <input type="text" name="userName" ng-model="user.name" required> +           <span class="error" ng-show="myForm.userName.error.REQUIRED">               Required!</span><br> -           Last name: <input type="text" name="lastName" ng:model="user.last" -             ng:minlength="3" ng:maxlength="10"> -           <span class="error" ng:show="myForm.lastName.error.MINLENGTH"> +           Last name: <input type="text" name="lastName" ng-model="user.last" +             ng-minlength="3" ng-maxlength="10"> +           <span class="error" ng-show="myForm.lastName.error.MINLENGTH">               Too short!</span> -           <span class="error" ng:show="myForm.lastName.error.MAXLENGTH"> +           <span class="error" ng-show="myForm.lastName.error.MAXLENGTH">               Too long!</span><br>           </form>           <hr> @@ -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() {   *         };   *       }   *     </script> - *     <div ng:controller="Controller"> - *       <input type="checkbox" ng:model="confirmed" ng:change="change()" id="ng-change-example1" /> - *       <input type="checkbox" ng:model="confirmed" id="ng-change-example2" /> + *     <div ng-controller="Controller"> + *       <input type="checkbox" ng-model="confirmed" ng-change="change()" id="ng-change-example1" /> + *       <input type="checkbox" ng-model="confirmed" id="ng-change-example2" />   *       <label for="ng-change-example2">Confirmed</label><br />   *       debug = {{confirmed}}<br />   *       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   * <doc:example>   *   <doc:source> - *     First name: <input type="text" ng:model="firstName" /><br /> - *     Last name: <input type="text" ng:model="lastName" ng:model-instant /><br /> + *     First name: <input type="text" ng-model="firstName" /><br /> + *     Last name: <input type="text" ng-model="lastName" ng-model-instant /><br />   *   *     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`.   *   </doc:source>   *   <doc:scenario>   *     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'];           }         </script> -       <form name="myForm" ng:controller="Ctrl"> -         List: <input name="input" ng:model="names" ng:list required> -         <span class="error" ng:show="myForm.list.error.REQUIRED"> +       <form name="myForm" ng-controller="Ctrl"> +         List: <input name="input" ng-model="names" ng-list required> +         <span class="error" ng-show="myForm.list.error.REQUIRED">             Required!</span>           <tt>names = {{names}}</tt><br/>           <tt>myForm.input.valid = {{myForm.input.valid}}</tt><br/> 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 - * `<span ng:bind="expression"></span>` when the template is compiled. + * `<span ng-bind="expression"></span>` 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';           }         </script> -       <div ng:controller="Ctrl"> -         Enter name: <input type="text" ng:model="name"> <br/> -         Hello <span ng:bind="name"></span>! +       <div ng-controller="Ctrl"> +         Enter name: <input type="text" ng-model="name"> <br/> +         Hello <span ng-bind="name"></span>!         </div>       </doc:source>       <doc:scenario> -       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';           }         </script> -       <div ng:controller="Ctrl"> -        Salutation: <input type="text" ng:model="salutation"><br/> -        Name: <input type="text" ng:model="name"><br/> -        <pre ng:bind-template="{{salutation}} {{name}}!"></pre> +       <div ng-controller="Ctrl"> +        Salutation: <input type="text" ng-model="salutation"><br/> +        Name: <input type="text" ng-model="name"><br/> +        <pre ng-bind-template="{{salutation}} {{name}}!"></pre>         </div>       </doc:source>       <doc:scenario> -       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 <tt ng:non-bindable>{{expression}}</tt> 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 <tt ng-non-bindable>{{expression}}</tt> for the value of an attribute.   * At compile time, the attribute is translated into an - * `<span ng:bind-attr="{attr:expression}"></span>`. + * `<span ng-bind-attr="{attr:expression}"></span>`.   * - * The following HTML snippet shows how to specify `ng:bind-attr`: + * The following HTML snippet shows how to specify `ng-bind-attr`:   * <pre> - *   <a ng:bind-attr='{"href":"http://www.google.com/search?q={{query}}"}'>Google</a> + *   <a ng-bind-attr='{"href":"http://www.google.com/search?q={{query}}"}'>Google</a>   * </pre>   *   * 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) {   *   <a href="http://www.google.com/search?q={{query}}">Google</a>   * </pre>   * - * 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 - *    <tt ng:non-bindable>{{expression}}</tt>s. Any number of + *    <tt ng-non-bindable>{{expression}}</tt>s. Any number of   *    key-value pairs can be specified.   *   * @example @@ -207,18 +207,18 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) {             $scope.query = 'AngularJS';           }         </script> -       <div ng:controller="Ctrl"> +       <div ng-controller="Ctrl">          Google for: -        <input type="text" ng:model="query"/> -        <a ng:bind-attr='{"href":"http://www.google.com/search?q={{query}}"}'> +        <input type="text" ng-model="query"/> +        <a ng-bind-attr='{"href":"http://www.google.com/search?q={{query}}"}'>            Google -        </a> (ng:bind-attr) | +        </a> (ng-bind-attr) |          <a href="http://www.google.com/search?q={{query}}">Google</a>          (curly binding in attribute val)         </div>       </doc:source>       <doc:scenario> -       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     <doc:example>       <doc:source> -      <input type="button" value="set" ng:click="myVar='ng-invalid'"> -      <input type="button" value="clear" ng:click="myVar=''"> +      <input type="button" value="set" ng-click="myVar='ng-invalid'"> +      <input type="button" value="clear" ng-click="myVar=''">        <br> -      <span ng:class="myVar">Sample Text     </span> +      <span ng-class="myVar">Sample Text     </span>       </doc:source>       <doc:scenario> -       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     <doc:example>       <doc:source> -        <ol ng:init="names=['John', 'Mary', 'Cate', 'Suz']"> -          <li ng:repeat="name in names"> -           <span ng:class-odd="'ng-format-negative'" -                 ng:class-even="'ng-invalid'"> +        <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']"> +          <li ng-repeat="name in names"> +           <span ng-class-odd="'ng-format-negative'" +                 ng-class-even="'ng-invalid'">               {{name}}                   </span>            </li>          </ol>       </doc:source>       <doc:scenario> -       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     <doc:example>       <doc:source> -        <ol ng:init="names=['John', 'Mary', 'Cate', 'Suz']"> -          <li ng:repeat="name in names"> -           <span ng:class-odd="'odd'" ng:class-even="'even'"> +        <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']"> +          <li ng-repeat="name in names"> +           <span ng-class-odd="'odd'" ng-class-even="'even'">               {{name}}                   </span>            </li>          </ol>       </doc:source>       <doc:scenario> -       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 `<body>` 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:   *   * <pre> @@ -22,8 +22,8 @@   * </pre>   *   * 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     <doc:example>       <doc:source> -        <div id="template1" ng:cloak>{{ 'hello' }}</div> -        <div id="template2" ng:cloak class="ng-cloak">{{ 'hello IE7' }}</div> +        <div id="template1" ng-cloak>{{ 'hello' }}</div> +        <div id="template2" ng-cloak class="ng-cloak">{{ 'hello IE7' }}</div>       </doc:source>       <doc:scenario>         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();         });       </doc:scenario> 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 @@            };          }        </script> -      <div ng:controller="SettingsController"> -        Name: <input type="text" ng:model="name"/> -        [ <a href="" ng:click="greet()">greet</a> ]<br/> +      <div ng-controller="SettingsController"> +        Name: <input type="text" ng-model="name"/> +        [ <a href="" ng-click="greet()">greet</a> ]<br/>          Contact:          <ul> -          <li ng:repeat="contact in contacts"> -            <select ng:model="contact.type"> +          <li ng-repeat="contact in contacts"> +            <select ng-model="contact.type">                 <option>phone</option>                 <option>email</option>              </select> -            <input type="text" ng:model="contact.value"/> -            [ <a href="" ng:click="clearContact(contact)">clear</a> -            | <a href="" ng:click="removeContact(contact)">X</a> ] +            <input type="text" ng-model="contact.value"/> +            [ <a href="" ng-click="clearContact(contact)">clear</a> +            | <a href="" ng-click="removeContact(contact)">X</a> ]            </li> -          <li>[ <a href="" ng:click="addContact()">add</a> ]</li> +          <li>[ <a href="" ng-click="addContact()">add</a> ]</li>         </ul>        </div>       </doc:source> 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     <doc:example>       <doc:source> -      <button ng:click="count = count + 1" ng:init="count=0"> +      <button ng-click="count = count + 1" ng-init="count=0">          Increment        </button>        count: {{count}}       </doc:source>       <doc:scenario> -       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(            };          }        </script> -      <form ng:submit="submit()" ng:controller="Ctrl"> +      <form ng-submit="submit()" ng-controller="Ctrl">          Enter text and hit enter: -        <input type="text" ng:model="text" name="text" /> +        <input type="text" ng-model="text" name="text" />          <input type="submit" id="submit" value="Submit" />          <pre>list={{list}}</pre>        </form>       </doc:source>       <doc:scenario> -       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];           }         </script> -       <div ng:controller="Ctrl"> -         <select ng:model="template" ng:options="t.name for t in templates"> +       <div ng-controller="Ctrl"> +         <select ng-model="template" ng-options="t.name for t in templates">            <option value="">(blank)</option>           </select>           url of the template: <tt><a href="{{template.url}}">{{template.url}}</a></tt> @@ -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     <doc:example>       <doc:source> -    <div ng:init="greeting='Hello'; person='World'"> +    <div ng-init="greeting='Hello'; person='World'">        {{greeting}} {{person}}!      </div>       </doc:source> 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      <doc:example>        <doc:source>          <div>Normal: {{1 + 2}}</div> -        <div ng:non-bindable>Ignored: {{1 + 2}}</div> +        <div ng-non-bindable>Ignored: {{1 + 2}}</div>        </doc:source>        <doc:scenario> -       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:   *   * <pre> - * <ng:pluralize count="personCount" + * <ng-pluralize count="personCount"                   when="{'0': 'Nobody is viewing.',   *                      'one': '1 person is viewing.',   *                      'other': '{} people are viewing.'}"> - * </ng:pluralize> + * </ng-pluralize>   *</pre>   *   * 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 - * <span ng:non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder - * for <span ng:non-bindable>{{numberExpression}}</span>. + * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder + * for <span ng-non-bindable>{{numberExpression}}</span>.   * - * # 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:   *   * <pre> - * <ng:pluralize count="personCount" offset=2 + * <ng-pluralize count="personCount" offset=2   *               when="{'0': 'Nobody is viewing.',   *                      '1': '{{person1}} is viewing.',   *                      '2': '{{person1}} and {{person2}} are viewing.',   *                      'one': '{{person1}}, {{person2}} and one other person are viewing.',   *                      'other': '{{person1}}, {{person2}} and {} other people are viewing.'}"> - * </ng:pluralize> + * </ng-pluralize>   * </pre>   *   * Notice that we are still using two plural categories(one, other), but we added @@ -100,10 +100,10 @@              $scope.personCount = 1;            }          </script> -        <div ng:controller="Ctrl"> -          Person 1:<input type="text" ng:model="person1" value="Igor" /><br/> -          Person 2:<input type="text" ng:model="person2" value="Misko" /><br/> -          Number of People:<input type="text" ng:model="personCount" value="1" /><br/> +        <div ng-controller="Ctrl"> +          Person 1:<input type="text" ng-model="person1" value="Igor" /><br/> +          Person 2:<input type="text" ng-model="person2" value="Misko" /><br/> +          Number of People:<input type="text" ng-model="personCount" value="1" /><br/>            <!--- Example with simple pluralization rules for en locale --->            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:      <doc:example>        <doc:source> -        <div ng:init="friends = [{name:'John', age:25}, {name:'Mary', age:28}]"> +        <div ng-init="friends = [{name:'John', age:25}, {name:'Mary', age:28}]">            I have {{friends.length}} friends. They are:            <ul> -            <li ng:repeat="friend in friends"> +            <li ng-repeat="friend in friends">                [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.              </li>            </ul>          </div>        </doc:source>        <doc:scenario> -         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     <doc:example>       <doc:source> -        Click me: <input type="checkbox" ng:model="checked"><br/> -        Show: <span ng:show="checked">I show up when your checkbox is checked.</span> <br/> -        Hide: <span ng:hide="checked">I hide when your checkbox is checked.</span> +        Click me: <input type="checkbox" ng-model="checked"><br/> +        Show: <span ng-show="checked">I show up when your checkbox is checked.</span> <br/> +        Hide: <span ng-hide="checked">I hide when your checkbox is checked.</span>       </doc:source>       <doc:scenario> -       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     <doc:example>       <doc:source> -        Click me: <input type="checkbox" ng:model="checked"><br/> -        Show: <span ng:show="checked">I show up when you checkbox is checked?</span> <br/> -        Hide: <span ng:hide="checked">I hide when you checkbox is checked?</span> +        Click me: <input type="checkbox" ng-model="checked"><br/> +        Show: <span ng-show="checked">I show up when you checkbox is checked?</span> <br/> +        Hide: <span ng-hide="checked">I hide when you checkbox is checked?</span>       </doc:source>       <doc:scenario> -       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     <doc:example>       <doc:source> -        <input type="button" value="set" ng:click="myStyle={color:'red'}"> -        <input type="button" value="clear" ng:click="myStyle={}"> +        <input type="button" value="set" ng-click="myStyle={color:'red'}"> +        <input type="button" value="clear" ng-click="myStyle={}">          <br/> -        <span ng:style="myStyle">Sample Text</span> +        <span ng-style="myStyle">Sample Text</span>          <pre>myStyle={{myStyle}}</pre>       </doc:source>       <doc:scenario> -       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 - * <any ng:switch-when="matchValue1">...</any> - *   <any ng:switch-when="matchValue2">...</any> + * <any ng-switch-when="matchValue1">...</any> + *   <any ng-switch-when="matchValue2">...</any>   *   ... - *   <any ng:switch-default>...</any> + *   <any ng-switch-default>...</any>   *   * @scope - * @param {*} on expression to match against <tt>ng:switch-when</tt>. + * @param {*} on expression to match against <tt>ng-switch-when</tt>.   * @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      <doc:example> @@ -32,29 +32,29 @@              $scope.selection = $scope.items[0];            }          </script> -        <div ng:controller="Ctrl"> -          <select ng:model="selection" ng:options="item for item in items"> +        <div ng-controller="Ctrl"> +          <select ng-model="selection" ng-options="item for item in items">            </select>            <tt>selection={{selection}}</tt>            <hr/> -          <ng:switch on="selection" > -            <div ng:switch-when="settings">Settings Div</div> -            <span ng:switch-when="home">Home Span</span> -            <span ng:switch-default>default</span> -          </ng:switch> +          <div ng-switch on="selection" > +            <div ng-switch-when="settings">Settings Div</div> +            <span ng-switch-when="home">Home Span</span> +            <span ng-switch-default>default</span> +          </div>          </div>        </doc:source>        <doc:scenario>          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/);          });        </doc:scenario>      </doc:example> 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 @@               };           });         </script> -       <div ng:controller="Ctrl"> -         <input ng:model="title"><br> -         <textarea ng:model="text"></textarea> <br/> +       <div ng-controller="Ctrl"> +         <input ng-model="title"><br> +         <textarea ng-model="text"></textarea> <br/>           <pane title="{{title}}">{{text}}</pane>         </div>       </doc:source> 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 @@            }          </script> -        <div ng:controller="MainCntl"> +        <div ng-controller="MainCntl">            Choose:            <a href="/Book/Moby">Moby</a> |            <a href="/Book/Moby/ch/1">Moby: Ch1</a> | @@ -67,7 +67,7 @@            <a href="/Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |            <a href="/Book/Scarlet">Scarlet Letter</a><br/> -          <ng:view></ng:view> +          <div ng-view></div>            <hr />            <pre>$location.path() = {{$location.path()}}</pre> @@ -80,13 +80,13 @@        <doc:scenario>          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.        </script> -      <a ng:click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a> +      <a ng-click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a>        <div id="tpl-content" ng-include src="currentTpl"></div>      </doc:source>      <doc:scenario> 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 `<option>` + * Optionally `ng-options` attribute can be used to dynamically generate a list of `<option>`   * elements for a `<select>` element using an array or an object obtained by evaluating the - * `ng:options` expression. + * `ng-options` expression.   *˝˝   * When an item in the select menu is select, the value of array element or object property - * represented by the selected option will be bound to the model identified by the `ng:model` attribute + * represented by the selected option will be bound to the model identified by the `ng-model` attribute   * of the parent select element.   *   * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can   * be nested into the `<select>` element. This element will then represent `null` or "not selected"   * option. See example below for demonstration.   * - * Note: `ng:options` provides iterator facility for `<option>` element which must be used instead - * of {@link angular.module.ng.$compileProvider.directive.ng:repeat ng:repeat}. `ng:repeat` is not suitable for use with + * Note: `ng-options` provides iterator facility for `<option>` element which must be used instead + * of {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat}. `ng-repeat` is not suitable for use with   * `<option>` element because of the following reasons:   *   *   * value attribute of the option element that we need to bind to requires a string, but the   *     source of data for the iteration might be in a form of array containing objects instead of   *     strings - *   * {@link angular.module.ng.$compileProvider.directive.ng:repeat ng:repeat} unrolls after the select binds causing + *   * {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} unrolls after the select binds causing   *     incorect rendering on most browsers.   *   * binding to a value not in list confuses most browsers.   *   * @param {string} name assignable expression to data-bind to.   * @param {string=} required The widget is considered valid only if value is entered. - * @param {comprehension_expression=} ng:options in one of the following forms: + * @param {comprehension_expression=} ng-options in one of the following forms:   *   *   * for array data sources:   *     * `label` **`for`** `value` **`in`** `array` @@ -76,42 +76,42 @@            $scope.color = $scope.colors[2]; // red          }          </script> -        <div ng:controller="MyCntrl"> +        <div ng-controller="MyCntrl">            <ul> -            <li ng:repeat="color in colors"> -              Name: <input ng:model="color.name"> -              [<a href ng:click="colors.$remove(color)">X</a>] +            <li ng-repeat="color in colors"> +              Name: <input ng-model="color.name"> +              [<a href ng-click="colors.$remove(color)">X</a>]              </li>              <li> -              [<a href ng:click="colors.push({})">add</a>] +              [<a href ng-click="colors.push({})">add</a>]              </li>            </ul>            <hr/>            Color (null not allowed): -          <select ng:model="color" ng:options="c.name for c in colors"></select><br> +          <select ng-model="color" ng-options="c.name for c in colors"></select><br>            Color (null allowed):            <div  class="nullable"> -            <select ng:model="color" ng:options="c.name for c in colors"> +            <select ng-model="color" ng-options="c.name for c in colors">                <option value="">-- chose color --</option>              </select>            </div><br/>            Color grouped by shade: -          <select ng:model="color" ng:options="c.name group by c.shade for c in colors"> +          <select ng-model="color" ng-options="c.name group by c.shade for c in colors">            </select><br/> -          Select <a href ng:click="color={name:'not in list'}">bogus</a>.<br> +          Select <a href ng-click="color={name:'not in list'}">bogus</a>.<br>            <hr/>            Currently selected: {{ {selected_color:color}  }}            <div style="border:solid 1px black; height:20px" -               ng:style="{'background-color':color.name}"> +               ng-style="{'background-color':color.name}">            </div>          </div>        </doc:source>        <doc:scenario> -         it('should check ng:options', function() { +         it('should check ng-options', function() {             expect(binding('{selected_color:color}')).toMatch('red');             select('color').option('0');             expect(binding('{selected_color:color}')).toMatch('black'); @@ -200,7 +200,7 @@ var selectDirective = ['$compile', '$parse', function($compile,   $parse) {          if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) {            throw Error( -            "Expected ng:options in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" + +            "Expected ng-options in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" +              " but got '" + optionsExp + "'.");          } diff --git a/src/loader.js b/src/loader.js index e5c5215a..fdfdaebd 100644 --- a/src/loader.js +++ b/src/loader.js @@ -54,7 +54,7 @@ function setupModuleLoader(window) {       * </pre>       *       * However it's more likely that you'll just use -     * {@link angular.module.ng.$compileProvider.directive.ng:app ng:app} or +     * {@link angular.module.ng.$compileProvider.directive.ng-app ng-app} or       * {@link angular.bootstrap} to simplify this process for you.       *       * @param {!string} name The name of the module to create or retrieve. diff --git a/src/service/compiler.js b/src/service/compiler.js index 42c694ff..5fb9035d 100644 --- a/src/service/compiler.js +++ b/src/service/compiler.js @@ -15,7 +15,7 @@   * instance functions into a single template function which is then returned.   *   * The template function can then be used once to produce the view or as it is the case with - * {@link angular.module.ng.$compileProvider.directive.ng:repeat repeater} many-times, in which + * {@link angular.module.ng.$compileProvider.directive.ng-repeat repeater} many-times, in which   * case each call results in a view that is a DOM clone of the original template.   *   <doc:example module="compile"> @@ -55,8 +55,8 @@        }      </script>      <div ng-controller="Ctrl"> -      <input ng:model="name"> <br> -      <textarea ng:model="html"></textarea> <br> +      <input ng-model="name"> <br> +      <textarea ng-model="html"></textarea> <br>        <div compile="html"></div>      </div>     </doc:source> diff --git a/src/service/filter/filter.js b/src/service/filter/filter.js index 49960546..9a62b484 100644 --- a/src/service/filter/filter.js +++ b/src/service/filter/filter.js @@ -35,27 +35,27 @@   * @example     <doc:example>       <doc:source> -       <div ng:init="friends = [{name:'John', phone:'555-1276'}, +       <div ng-init="friends = [{name:'John', phone:'555-1276'},                                  {name:'Mary', phone:'800-BIG-MARY'},                                  {name:'Mike', phone:'555-4321'},                                  {name:'Adam', phone:'555-5678'},                                  {name:'Julie', phone:'555-8765'}]"></div> -       Search: <input ng:model="searchText"/> +       Search: <input ng-model="searchText"/>         <table id="searchTextResults">           <tr><th>Name</th><th>Phone</th><tr> -         <tr ng:repeat="friend in friends | filter:searchText"> +         <tr ng-repeat="friend in friends | filter:searchText">             <td>{{friend.name}}</td>             <td>{{friend.phone}}</td>           <tr>         </table>         <hr> -       Any: <input ng:model="search.$"/> <br> -       Name only <input ng:model="search.name"/><br> -       Phone only <input ng:model="search.phone"/><br> +       Any: <input ng-model="search.$"/> <br> +       Name only <input ng-model="search.name"/><br> +       Phone only <input ng-model="search.phone"/><br>         <table id="searchObjResults">           <tr><th>Name</th><th>Phone</th><tr> -         <tr ng:repeat="friend in friends | filter:search"> +         <tr ng-repeat="friend in friends | filter:search">             <td>{{friend.name}}</td>             <td>{{friend.phone}}</td>           <tr> diff --git a/src/service/filter/filters.js b/src/service/filter/filters.js index 58a3a869..2b1fe533 100644 --- a/src/service/filter/filters.js +++ b/src/service/filter/filters.js @@ -22,8 +22,8 @@             $scope.amount = 1234.56;           }         </script> -       <div ng:controller="Ctrl"> -         <input type="number" ng:model="amount"/> <br/> +       <div ng-controller="Ctrl"> +         <input type="number" ng-model="amount"/> <br/>           default currency symbol ($): {{amount | currency}}<br/>           custom currency identifier (USD$): {{amount | currency:"USD$"}}         </div> @@ -73,8 +73,8 @@ function currencyFilter($locale) {             $scope.val = 1234.56789;           }         </script> -       <div ng:controller="Ctrl"> -         Enter number: <input ng:model='val'><br/> +       <div ng-controller="Ctrl"> +         Enter number: <input ng-model='val'><br/>           Default formatting: {{val | number}}<br/>           No fractions: {{val | number:0}}<br/>           Negative number: {{-val | number:4}} @@ -296,11 +296,11 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+   * @example     <doc:example>       <doc:source> -       <span ng:non-bindable>{{1288323623006 | date:'medium'}}</span>: +       <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:             {{1288323623006 | date:'medium'}}<br/> -       <span ng:non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>: +       <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:            {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}<br/> -       <span ng:non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>: +       <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:            {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}<br/>       </doc:source>       <doc:scenario> @@ -445,8 +445,8 @@ var uppercaseFilter = valueFn(uppercase);               'and one more: ftp://127.0.0.1/.';           }         </script> -       <div ng:controller="Ctrl"> -       Snippet: <textarea ng:model="snippet" cols="60" rows="3"></textarea> +       <div ng-controller="Ctrl"> +       Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>         <table>           <tr>             <td>Filter</td> @@ -456,16 +456,16 @@ var uppercaseFilter = valueFn(uppercase);           <tr id="linky-filter">             <td>linky filter</td>             <td> -             <pre><div ng:bind-html="snippet | linky"><br/></div></pre> +             <pre><div ng-bind-html="snippet | linky"><br/></div></pre>             </td>             <td> -             <div ng:bind-html="snippet | linky"></div> +             <div ng-bind-html="snippet | linky"></div>             </td>           </tr>           <tr id="escaped-html">             <td>no filter</td> -           <td><pre><div ng:bind="snippet"><br/></div></pre></td> -           <td><div ng:bind="snippet"></div></td> +           <td><pre><div ng-bind="snippet"><br/></div></pre></td> +           <td><div ng-bind="snippet"></div></td>           </tr>         </table>       </doc:source> diff --git a/src/service/filter/limitTo.js b/src/service/filter/limitTo.js index eb97fdad..032a8d61 100644 --- a/src/service/filter/limitTo.js +++ b/src/service/filter/limitTo.js @@ -30,14 +30,14 @@             $scope.limit = 3;           }         </script> -       <div ng:controller="Ctrl"> -         Limit {{numbers}} to: <input type="integer" ng:model="limit"/> +       <div ng-controller="Ctrl"> +         Limit {{numbers}} to: <input type="integer" ng-model="limit"/>           <p>Output: {{ numbers | limitTo:limit | json }}</p>         </div>       </doc:source>       <doc:scenario>         it('should limit the numer array to first three items', function() { -         expect(element('.doc-example-live input[ng\\:model=limit]').val()).toBe('3'); +         expect(element('.doc-example-live input[ng-model=limit]').val()).toBe('3');           expect(binding('numbers | limitTo:limit | json')).toEqual('[1,2,3]');         }); diff --git a/src/service/filter/orderBy.js b/src/service/filter/orderBy.js index e7528a4b..3f4fe395 100644 --- a/src/service/filter/orderBy.js +++ b/src/service/filter/orderBy.js @@ -42,18 +42,18 @@             $scope.predicate = '-age';           }         </script> -       <div ng:controller="Ctrl"> +       <div ng-controller="Ctrl">           <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>           <hr/> -         [ <a href="" ng:click="predicate=''">unsorted</a> ] +         [ <a href="" ng-click="predicate=''">unsorted</a> ]           <table class="friend">             <tr> -             <th><a href="" ng:click="predicate = 'name'; reverse=false">Name</a> -                 (<a href ng:click="predicate = '-name'; reverse=false">^</a>)</th> -             <th><a href="" ng:click="predicate = 'phone'; reverse=!reverse">Phone Number</a></th> -             <th><a href="" ng:click="predicate = 'age'; reverse=!reverse">Age</a></th> +             <th><a href="" ng-click="predicate = 'name'; reverse=false">Name</a> +                 (<a href ng-click="predicate = '-name'; reverse=false">^</a>)</th> +             <th><a href="" ng-click="predicate = 'phone'; reverse=!reverse">Phone Number</a></th> +             <th><a href="" ng-click="predicate = 'age'; reverse=!reverse">Age</a></th>             <tr> -           <tr ng:repeat="friend in friends | orderBy:predicate:reverse"> +           <tr ng-repeat="friend in friends | orderBy:predicate:reverse">               <td>{{friend.name}}</td>               <td>{{friend.phone}}</td>               <td>{{friend.age}}</td> diff --git a/src/service/http.js b/src/service/http.js index afaae2de..5dd87d76 100644 --- a/src/service/http.js +++ b/src/service/http.js @@ -420,16 +420,16 @@ function $HttpProvider() {                  };                }              </script> -            <div ng:controller="FetchCtrl"> -              <select ng:model="method"> +            <div ng-controller="FetchCtrl"> +              <select ng-model="method">                  <option>GET</option>                  <option>JSONP</option>                </select> -              <input type="text" ng:model="url" size="80"/> -              <button ng:click="fetch()">fetch</button><br> -              <button ng:click="updateModel('GET', 'examples/http-hello.html')">Sample GET</button> -              <button ng:click="updateModel('JSONP', 'http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">Sample JSONP</button> -              <button ng:click="updateModel('JSONP', 'http://angularjs.org/doesntexist&callback=JSON_CALLBACK')">Invalid JSONP</button> +              <input type="text" ng-model="url" size="80"/> +              <button ng-click="fetch()">fetch</button><br> +              <button ng-click="updateModel('GET', 'examples/http-hello.html')">Sample GET</button> +              <button ng-click="updateModel('JSONP', 'http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">Sample JSONP</button> +              <button ng-click="updateModel('JSONP', 'http://angularjs.org/doesntexist&callback=JSON_CALLBACK')">Invalid JSONP</button>                <pre>http status code: {{status}}</pre>                <pre>http response data: {{data}}</pre>              </div> diff --git a/src/service/location.js b/src/service/location.js index 43e6ce52..a7ff103b 100644 --- a/src/service/location.js +++ b/src/service/location.js @@ -501,7 +501,7 @@ function $LocationProvider(){          }          var href = elm.attr('href'); -        if (!href || isDefined(elm.attr('ng:ext-link')) || elm.attr('target')) return; +        if (!href || isDefined(elm.attr('ng-ext-link')) || elm.attr('target')) return;          // remove same domain from full url links (IE7 always returns full hrefs)          href = href.replace(absUrlPrefix, ''); diff --git a/src/service/log.js b/src/service/log.js index d6566140..76413618 100644 --- a/src/service/log.js +++ b/src/service/log.js @@ -20,14 +20,14 @@               this.message = 'Hello World!';             }           </script> -         <div ng:controller="LogCtrl"> +         <div ng-controller="LogCtrl">             <p>Reload this page with open console, enter text and hit the log button...</p>             Message: -           <input type="text" ng:model="message"/> -           <button ng:click="$log.log(message)">log</button> -           <button ng:click="$log.warn(message)">warn</button> -           <button ng:click="$log.info(message)">info</button> -           <button ng:click="$log.error(message)">error</button> +           <input type="text" ng-model="message"/> +           <button ng-click="$log.log(message)">log</button> +           <button ng-click="$log.warn(message)">warn</button> +           <button ng-click="$log.info(message)">info</button> +           <button ng-click="$log.error(message)">error</button>           </div>        </doc:source>        <doc:scenario> diff --git a/src/service/resource.js b/src/service/resource.js index d2b722c2..790d5ed6 100644 --- a/src/service/resource.js +++ b/src/service/resource.js @@ -178,18 +178,18 @@           BuzzController.$inject = ['$resource'];         </script> -       <div ng:controller="BuzzController"> -         <input ng:model="userId"/> -         <button ng:click="fetch()">fetch</button> +       <div ng-controller="BuzzController"> +         <input ng-model="userId"/> +         <button ng-click="fetch()">fetch</button>           <hr/> -         <div ng:repeat="item in activities.data.items"> +         <div ng-repeat="item in activities.data.items">             <h1 style="font-size: 15px;">               <img src="{{item.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>               <a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a> -             <a href ng:click="expandReplies(item)" style="float: right;">Expand replies: {{item.links.replies[0].count}}</a> +             <a href ng-click="expandReplies(item)" style="float: right;">Expand replies: {{item.links.replies[0].count}}</a>             </h1>             {{item.object.content | html}} -           <div ng:repeat="reply in item.replies.data.items" style="margin-left: 20px;"> +           <div ng-repeat="reply in item.replies.data.items" style="margin-left: 20px;">               <img src="{{reply.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>               <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>: {{reply.content | html}}             </div> diff --git a/src/service/route.js b/src/service/route.js index 3b135e65..3e9cbb41 100644 --- a/src/service/route.js +++ b/src/service/route.js @@ -27,8 +27,8 @@ function $RouteProvider(){     *    - `controller` – `{function()=}` – Controller fn that should be associated with newly     *      created scope.     *    - `template` – `{string=}` – path to an html template that should be used by -   *      {@link angular.module.ng.$compileProvider.directive.ng:view ng:view} or -   *      {@link angular.module.ng.$compileProvider.directive.ng:include ng:include} widgets. +   *      {@link angular.module.ng.$compileProvider.directive.ng-view ng-view} or +   *      {@link angular.module.ng.$compileProvider.directive.ng-include ng-include} widgets.     *    - `redirectTo` – {(string|function())=} – value to update     *      {@link angular.module.ng.$location $location} path with and trigger route redirection.     * @@ -94,12 +94,12 @@ function $RouteProvider(){       *       * You can define routes through {@link angular.module.ng.$routeProvider $routeProvider}'s API.       * -     * The `$route` service is typically used in conjunction with {@link angular.module.ng.$compileProvider.directive.ng:view ng:view} +     * The `$route` service is typically used in conjunction with {@link angular.module.ng.$compileProvider.directive.ng-view ng-view}       * directive and the {@link angular.module.ng.$routeParams $routeParams} service.       *       * @example         This example shows how changing the URL hash causes the `$route` to match a route against the -       URL, and the `ng:view` pulls in the partial. +       URL, and the `ng-view` pulls in the partial.         Note that this example is using {@link angular.module.ng.$compileProvide.directive.script inlined templates}         to get it working on jsfiddle as well. @@ -143,7 +143,7 @@ function $RouteProvider(){              }            </script> -          <div ng:controller="MainCntl"> +          <div ng-controller="MainCntl">              Choose:              <a href="/Book/Moby">Moby</a> |              <a href="/Book/Moby/ch/1">Moby: Ch1</a> | @@ -151,7 +151,7 @@ function $RouteProvider(){              <a href="/Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |              <a href="/Book/Scarlet">Scarlet Letter</a><br/> -            <ng:view></ng:view> +            <div ng-view></div>              <hr />              <pre>$location.path() = {{$location.path()}}</pre> @@ -164,13 +164,13 @@ function $RouteProvider(){          <doc:scenario>            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/);            }); @@ -228,7 +228,7 @@ function $RouteProvider(){             * Causes `$route` service to reload the current route even if             * {@link angular.module.ng.$location $location} hasn't changed.             * -           * As a result of that, {@link angular.module.ng.$compileProvider.directive.ng:view ng:view} +           * As a result of that, {@link angular.module.ng.$compileProvider.directive.ng-view ng-view}             * creates new scope, reinstantiates the controller.             */            reload: function() { diff --git a/src/service/sanitize.js b/src/service/sanitize.js index 1446487c..7ca0711a 100644 --- a/src/service/sanitize.js +++ b/src/service/sanitize.js @@ -44,8 +44,8 @@               'snippet</p>';           }         </script> -       <div ng:controller="Ctrl"> -          Snippet: <textarea ng:model="snippet" cols="60" rows="3"></textarea> +       <div ng-controller="Ctrl"> +          Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>             <table>               <tr>                 <td>Filter</td> @@ -55,21 +55,21 @@               <tr id="html-filter">                 <td>html filter</td>                 <td> -                 <pre><div ng:bind-html="snippet"><br/></div></pre> +                 <pre><div ng-bind-html="snippet"><br/></div></pre>                 </td>                 <td> -                 <div ng:bind-html="snippet"></div> +                 <div ng-bind-html="snippet"></div>                 </td>               </tr>               <tr id="escaped-html">                 <td>no filter</td> -               <td><pre><div ng:bind="snippet"><br/></div></pre></td> -               <td><div ng:bind="snippet"></div></td> +               <td><pre><div ng-bind="snippet"><br/></div></pre></td> +               <td><div ng-bind="snippet"></div></td>               </tr>               <tr id="html-unsafe-filter">                 <td>unsafe html filter</td> -               <td><pre><div ng:bind-html-unsafe="snippet"><br/></div></pre></td> -               <td><div ng:bind-html-unsafe="snippet"></div></td> +               <td><pre><div ng-bind-html-unsafe="snippet"><br/></div></pre></td> +               <td><div ng-bind-html-unsafe="snippet"></div></td>               </tr>             </table>           </div> diff --git a/src/service/scope.js b/src/service/scope.js index d5646008..24313620 100644 --- a/src/service/scope.js +++ b/src/service/scope.js @@ -329,7 +329,7 @@ function $RootScopeProvider(){         * `'Maximum iteration limit exceeded.'` if the number of iterations exceeds 100.         *         * Usually you don't call `$digest()` directly in -       * {@link angular.module.ng.$compileProvider.directive.ng:controller controllers} or in +       * {@link angular.module.ng.$compileProvider.directive.ng-controller controllers} or in         * {@link angular.module.ng.$compileProvider.directive directives}.         * Instead a call to {@link angular.module.ng.$rootScope.Scope#$apply $apply()} (typically from within a         * {@link angular.module.ng.$compileProvider.directive directives}) will force a `$digest()`. @@ -453,7 +453,7 @@ function $RootScopeProvider(){         * The destructing scope emits an `$destroy` {@link angular.module.ng.$rootScope.Scope#$emit event}.         *         * The `$destroy()` is usually used by directives such as -       * {@link angular.module.ng.$compileProvider.directive.ng:repeat ng:repeat} for managing the unrolling of the loop. +       * {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} for managing the unrolling of the loop.         *         */        $destroy: function() { diff --git a/src/service/window.js b/src/service/window.js index 7bb3dfca..d7adea03 100644 --- a/src/service/window.js +++ b/src/service/window.js @@ -16,8 +16,8 @@   * @example     <doc:example>       <doc:source> -       <input ng:init="$window = $service('$window'); greeting='Hello World!'" type="text" ng:model="greeting" /> -       <button ng:click="$window.alert(greeting)">ALERT</button> +       <input ng-init="$window = $service('$window'); greeting='Hello World!'" type="text" ng-model="greeting" /> +       <button ng-click="$window.alert(greeting)">ALERT</button>       </doc:source>       <doc:scenario>       </doc:scenario> diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 9d7bda94..7e070761 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -317,15 +317,15 @@ describe('angular', function() {      }); -    it('should look for ng:app directive in id', function() { -      var appElement = jqLite('<div id="ng:app" data-ng-app="ABC"></div>')[0]; +    it('should look for ng-app directive in id', function() { +      var appElement = jqLite('<div id="ng-app" data-ng-app="ABC"></div>')[0];        jqLite(document.body).append(appElement);        angularInit(element, bootstrap);        expect(bootstrap).toHaveBeenCalledOnceWith(appElement, ['ABC']);      }); -    it('should look for ng:app directive in className', function() { +    it('should look for ng-app directive in className', function() {        var appElement = jqLite('<div data-ng-app="ABC"></div>')[0];        element.querySelectorAll = function(arg) { return element.querySelectorAll[arg] || []; }        element.querySelectorAll['.ng\\:app'] = [appElement]; @@ -334,7 +334,7 @@ describe('angular', function() {      }); -    it('should look for ng:app directive using querySelectorAll', function() { +    it('should look for ng-app directive using querySelectorAll', function() {        var appElement = jqLite('<div x-ng-app="ABC"></div>')[0];        element.querySelectorAll = function(arg) { return element.querySelectorAll[arg] || []; }        element.querySelectorAll['[ng\\:app]'] = [ appElement ]; @@ -464,7 +464,7 @@ describe('angular', function() {      if (!msie || msie >= 9) {        it('should correctly detect node name with "namespace" when xmlns is NOT defined', function() {          var div = jqLite('<div xmlns:ngtest="http://angularjs.org/">' + -                           '<ngtest:foo ngtest:attr="bar"></ng:test>' + +                           '<ngtest:foo ngtest:attr="bar"></ng-test>' +                           '</div>')[0];          expect(nodeName_(div.childNodes[0])).toBe('NGTEST:FOO');          expect(div.childNodes[0].getAttribute('ngtest:attr')).toBe('bar'); @@ -512,7 +512,7 @@ describe('angular', function() {    describe('startingElementHtml', function(){      it('should show starting element tag only', function(){ -      expect(startingTag('<ng:abc x="2"><div>text</div></ng:abc>')).toEqual('<ng:abc x="2">'); +      expect(startingTag('<ng-abc x="2"><div>text</div></ng-abc>')).toEqual('<ng-abc x="2">');      });    }); diff --git a/test/BinderSpec.js b/test/BinderSpec.js index eb916d00..94b58d0a 100644 --- a/test/BinderSpec.js +++ b/test/BinderSpec.js @@ -26,24 +26,24 @@ describe('Binder', function() {    });    it('BindUpdate', inject(function($rootScope, $compile) { -    $compile('<div ng:init="a=123"/>')($rootScope); +    $compile('<div ng-init="a=123"/>')($rootScope);      $rootScope.$digest();      expect($rootScope.a).toBe(123);    }));    it('ExecuteInitialization', inject(function($rootScope, $compile) { -    $compile('<div ng:init="a=123">')($rootScope); +    $compile('<div ng-init="a=123">')($rootScope);      expect($rootScope.a).toBe(123);    }));    it('ExecuteInitializationStatements', inject(function($rootScope, $compile) { -    $compile('<div ng:init="a=123;b=345">')($rootScope); +    $compile('<div ng-init="a=123;b=345">')($rootScope);      expect($rootScope.a).toBe(123);      expect($rootScope.b).toBe(345);    }));    it('ApplyTextBindings', inject(function($rootScope, $compile) { -    element = $compile('<div ng:bind="model.a">x</div>')($rootScope); +    element = $compile('<div ng-bind="model.a">x</div>')($rootScope);      $rootScope.model = {a:123};      $rootScope.$apply();      expect(element.text()).toBe('123'); @@ -52,11 +52,11 @@ describe('Binder', function() {    it('AttributesNoneBound', inject(function($rootScope, $compile) {      var a = $compile('<a href="abc" foo="def"></a>')($rootScope);      expect(a[0].nodeName).toBe('A'); -    expect(a.attr('ng:bind-attr')).toBeFalsy(); +    expect(a.attr('ng-bind-attr')).toBeFalsy();    }));    it('AttributesAreEvaluated', inject(function($rootScope, $compile) { -    var a = $compile('<a ng:bind-attr=\'{"a":"a", "b":"a+b={{a+b}}"}\'></a>')($rootScope); +    var a = $compile('<a ng-bind-attr=\'{"a":"a", "b":"a+b={{a+b}}"}\'></a>')($rootScope);      $rootScope.$eval('a=1;b=2');      $rootScope.$apply();      expect(a.attr('a')).toBe('a'); @@ -66,7 +66,7 @@ describe('Binder', function() {    it('InputTypeButtonActionExecutesInScope', inject(function($rootScope, $compile) {      var savedCalled = false;      element = $compile( -      '<input type="button" ng:click="person.save()" value="Apply">')($rootScope); +      '<input type="button" ng-click="person.save()" value="Apply">')($rootScope);      $rootScope.person = {};      $rootScope.person.save = function() {        savedCalled = true; @@ -77,7 +77,7 @@ describe('Binder', function() {    it('InputTypeButtonActionExecutesInScope2', inject(function($rootScope, $compile) {      var log = ""; -    element = $compile('<input type="image" ng:click="action()">')($rootScope); +    element = $compile('<input type="image" ng-click="action()">')($rootScope);      $rootScope.action = function() {        log += 'click;';      }; @@ -88,7 +88,7 @@ describe('Binder', function() {    it('ButtonElementActionExecutesInScope', inject(function($rootScope, $compile) {      var savedCalled = false; -    element = $compile('<button ng:click="person.save()">Apply</button>')($rootScope); +    element = $compile('<button ng-click="person.save()">Apply</button>')($rootScope);      $rootScope.person = {};      $rootScope.person.save = function() {        savedCalled = true; @@ -100,7 +100,7 @@ describe('Binder', function() {    it('RepeaterUpdateBindings', inject(function($rootScope, $compile) {      var form = $compile(        '<ul>' + -        '<LI ng:repeat="item in model.items" ng:bind="item.a"></LI>' + +        '<LI ng-repeat="item in model.items" ng-bind="item.a"></LI>' +        '</ul>')($rootScope);      var items = [{a: 'A'}, {a: 'B'}];      $rootScope.model = {items: items}; @@ -109,8 +109,8 @@ describe('Binder', function() {      expect(sortedHtml(form)).toBe(          '<ul>' +            '<#comment></#comment>' + -          '<li ng:bind="item.a" ng:repeat="item in model.items">A</li>' + -          '<li ng:bind="item.a" ng:repeat="item in model.items">B</li>' + +          '<li ng-bind="item.a" ng-repeat="item in model.items">A</li>' + +          '<li ng-bind="item.a" ng-repeat="item in model.items">B</li>' +          '</ul>');      items.unshift({a: 'C'}); @@ -118,9 +118,9 @@ describe('Binder', function() {      expect(sortedHtml(form)).toBe(          '<ul>' +            '<#comment></#comment>' + -          '<li ng:bind="item.a" ng:repeat="item in model.items">C</li>' + -          '<li ng:bind="item.a" ng:repeat="item in model.items">A</li>' + -          '<li ng:bind="item.a" ng:repeat="item in model.items">B</li>' + +          '<li ng-bind="item.a" ng-repeat="item in model.items">C</li>' + +          '<li ng-bind="item.a" ng-repeat="item in model.items">A</li>' + +          '<li ng-bind="item.a" ng-repeat="item in model.items">B</li>' +          '</ul>');      items.shift(); @@ -128,8 +128,8 @@ describe('Binder', function() {      expect(sortedHtml(form)).toBe(          '<ul>' +            '<#comment></#comment>' + -          '<li ng:bind="item.a" ng:repeat="item in model.items">A</li>' + -          '<li ng:bind="item.a" ng:repeat="item in model.items">B</li>' + +          '<li ng-bind="item.a" ng-repeat="item in model.items">A</li>' + +          '<li ng-bind="item.a" ng-repeat="item in model.items">B</li>' +          '</ul>');      items.shift(); @@ -140,14 +140,14 @@ describe('Binder', function() {    it('RepeaterContentDoesNotBind', inject(function($rootScope, $compile) {      element = $compile(        '<ul>' + -        '<LI ng:repeat="item in model.items"><span ng:bind="item.a"></span></li>' + +        '<LI ng-repeat="item in model.items"><span ng-bind="item.a"></span></li>' +        '</ul>')($rootScope);      $rootScope.model = {items: [{a: 'A'}]};      $rootScope.$apply();      expect(sortedHtml(element)).toBe(          '<ul>' +            '<#comment></#comment>' + -          '<li ng:repeat="item in model.items"><span ng:bind="item.a">A</span></li>' + +          '<li ng-repeat="item in model.items"><span ng-bind="item.a">A</span></li>' +          '</ul>');    })); @@ -157,7 +157,7 @@ describe('Binder', function() {    });    it('RepeaterAdd', inject(function($rootScope, $compile) { -    element = $compile('<div><input type="text" ng:model="item.x" ng:repeat="item in items"></div>')($rootScope); +    element = $compile('<div><input type="text" ng-model="item.x" ng-repeat="item in items"></div>')($rootScope);      $rootScope.items = [{x:'a'}, {x:'b'}];      $rootScope.$apply();      var first = childNode(element, 1); @@ -171,7 +171,7 @@ describe('Binder', function() {    }));    it('ItShouldRemoveExtraChildrenWhenIteratingOverHash', inject(function($rootScope, $compile) { -    element = $compile('<div><div ng:repeat="i in items">{{i}}</div></div>')($rootScope); +    element = $compile('<div><div ng-repeat="i in items">{{i}}</div></div>')($rootScope);      var items = {};      $rootScope.items = items; @@ -237,8 +237,8 @@ describe('Binder', function() {    it('NestedRepeater', inject(function($rootScope, $compile) {      element = $compile(        '<div>' + -        '<div ng:repeat="m in model" name="{{m.name}}">' + -           '<ul name="{{i}}" ng:repeat="i in m.item"></ul>' + +        '<div ng-repeat="m in model" name="{{m.name}}">' + +           '<ul name="{{i}}" ng-repeat="i in m.item"></ul>' +          '</div>' +        '</div>')($rootScope); @@ -248,21 +248,21 @@ describe('Binder', function() {      expect(sortedHtml(element)).toBe(          '<div>'+            '<#comment></#comment>'+ -          '<div name="a" ng:repeat="m in model">'+ +          '<div name="a" ng-repeat="m in model">'+              '<#comment></#comment>'+ -            '<ul name="a1" ng:repeat="i in m.item"></ul>'+ -            '<ul name="a2" ng:repeat="i in m.item"></ul>'+ +            '<ul name="a1" ng-repeat="i in m.item"></ul>'+ +            '<ul name="a2" ng-repeat="i in m.item"></ul>'+            '</div>'+ -          '<div name="b" ng:repeat="m in model">'+ +          '<div name="b" ng-repeat="m in model">'+              '<#comment></#comment>'+ -            '<ul name="b1" ng:repeat="i in m.item"></ul>'+ -            '<ul name="b2" ng:repeat="i in m.item"></ul>'+ +            '<ul name="b1" ng-repeat="i in m.item"></ul>'+ +            '<ul name="b2" ng-repeat="i in m.item"></ul>'+            '</div>' +          '</div>');    }));    it('HideBindingExpression', inject(function($rootScope, $compile) { -    element = $compile('<div ng:hide="hidden == 3"/>')($rootScope); +    element = $compile('<div ng-hide="hidden == 3"/>')($rootScope);      $rootScope.hidden = 3;      $rootScope.$apply(); @@ -276,7 +276,7 @@ describe('Binder', function() {    }));    it('HideBinding', inject(function($rootScope, $compile) { -    element = $compile('<div ng:hide="hidden"/>')($rootScope); +    element = $compile('<div ng-hide="hidden"/>')($rootScope);      $rootScope.hidden = 'true';      $rootScope.$apply(); @@ -295,7 +295,7 @@ describe('Binder', function() {    }));    it('ShowBinding', inject(function($rootScope, $compile) { -    element = $compile('<div ng:show="show"/>')($rootScope); +    element = $compile('<div ng-show="show"/>')($rootScope);      $rootScope.show = 'true';      $rootScope.$apply(); @@ -315,23 +315,23 @@ describe('Binder', function() {    it('BindClass', inject(function($rootScope, $compile) { -    element = $compile('<div ng:class="clazz"/>')($rootScope); +    element = $compile('<div ng-class="clazz"/>')($rootScope);      $rootScope.clazz = 'testClass';      $rootScope.$apply(); -    expect(sortedHtml(element)).toBe('<div class="testClass" ng:class="clazz"></div>'); +    expect(sortedHtml(element)).toBe('<div class="testClass" ng-class="clazz"></div>');      $rootScope.clazz = ['a', 'b'];      $rootScope.$apply(); -    expect(sortedHtml(element)).toBe('<div class="a b" ng:class="clazz"></div>'); +    expect(sortedHtml(element)).toBe('<div class="a b" ng-class="clazz"></div>');    }));    it('BindClassEvenOdd', inject(function($rootScope, $compile) {      element = $compile(        '<div>' + -        '<div ng:repeat="i in [0,1]" ng:class-even="\'e\'" ng:class-odd="\'o\'"></div>' + +        '<div ng-repeat="i in [0,1]" ng-class-even="\'e\'" ng-class-odd="\'o\'"></div>' +        '</div>')($rootScope);      $rootScope.$apply();      var d1 = jqLite(element[0].childNodes[1]); @@ -340,12 +340,12 @@ describe('Binder', function() {      expect(d2.hasClass('e')).toBeTruthy();      expect(sortedHtml(element)).toBe(          '<div><#comment></#comment>' + -        '<div class="o" ng:class-even="\'e\'" ng:class-odd="\'o\'" ng:repeat="i in [0,1]"></div>' + -        '<div class="e" ng:class-even="\'e\'" ng:class-odd="\'o\'" ng:repeat="i in [0,1]"></div></div>'); +        '<div class="o" ng-class-even="\'e\'" ng-class-odd="\'o\'" ng-repeat="i in [0,1]"></div>' + +        '<div class="e" ng-class-even="\'e\'" ng-class-odd="\'o\'" ng-repeat="i in [0,1]"></div></div>');    }));    it('BindStyle', inject(function($rootScope, $compile) { -    element = $compile('<div ng:style="style"/>')($rootScope); +    element = $compile('<div ng-style="style"/>')($rootScope);      $rootScope.$eval('style={height: "10px"}');      $rootScope.$apply(); @@ -361,7 +361,7 @@ describe('Binder', function() {        $exceptionHandlerProvider.mode('log');      });      inject(function($rootScope, $exceptionHandler, $compile) { -      var input = $compile('<a ng:click="action()">Add Phone</a>')($rootScope); +      var input = $compile('<a ng-click="action()">Add Phone</a>')($rootScope);        $rootScope.action = function() {          throw new Error('MyError');        }; @@ -373,9 +373,9 @@ describe('Binder', function() {    it('ShoulIgnoreVbNonBindable', inject(function($rootScope, $compile) {      element = $compile(        "<div>{{a}}" + -        "<div ng:non-bindable>{{a}}</div>" + -        "<div ng:non-bindable=''>{{b}}</div>" + -        "<div ng:non-bindable='true'>{{c}}</div>" + +        "<div ng-non-bindable>{{a}}</div>" + +        "<div ng-non-bindable=''>{{b}}</div>" + +        "<div ng-non-bindable='true'>{{c}}</div>" +        "</div>")($rootScope);      $rootScope.a = 123;      $rootScope.$apply(); @@ -392,7 +392,7 @@ describe('Binder', function() {    it('FillInOptionValueWhenMissing', inject(function($rootScope, $compile) {      element = $compile( -        '<select ng:model="foo">' + +        '<select ng-model="foo">' +            '<option selected="true">{{a}}</option>' +            '<option value="">{{b}}</option>' +            '<option>C</option>' + @@ -417,12 +417,12 @@ describe('Binder', function() {    it('DeleteAttributeIfEvaluatesFalse', inject(function($rootScope, $compile) {      element = $compile(        '<div>' + -        '<input ng:model="a0" ng:bind-attr="{disabled:\'{{true}}\'}">' + -        '<input ng:model="a1" ng:bind-attr="{disabled:\'{{false}}\'}">' + -        '<input ng:model="b0" ng:bind-attr="{disabled:\'{{1}}\'}">' + -        '<input ng:model="b1" ng:bind-attr="{disabled:\'{{0}}\'}">' + -        '<input ng:model="c0" ng:bind-attr="{disabled:\'{{[0]}}\'}">' + -        '<input ng:model="c1" ng:bind-attr="{disabled:\'{{[]}}\'}">' + +        '<input ng-model="a0" ng-bind-attr="{disabled:\'{{true}}\'}">' + +        '<input ng-model="a1" ng-bind-attr="{disabled:\'{{false}}\'}">' + +        '<input ng-model="b0" ng-bind-attr="{disabled:\'{{1}}\'}">' + +        '<input ng-model="b1" ng-bind-attr="{disabled:\'{{0}}\'}">' + +        '<input ng-model="c0" ng-bind-attr="{disabled:\'{{[0]}}\'}">' + +        '<input ng-model="c1" ng-bind-attr="{disabled:\'{{[]}}\'}">' +        '</div>')($rootScope);      $rootScope.$apply();      function assertChild(index, disabled) { @@ -440,8 +440,8 @@ describe('Binder', function() {    it('ItShouldSelectTheCorrectRadioBox', inject(function($rootScope, $compile) {      element = $compile(        '<div>' + -        '<input type="radio" ng:model="sex" value="female">' + -        '<input type="radio" ng:model="sex" value="male">' + +        '<input type="radio" ng-model="sex" value="female">' + +        '<input type="radio" ng-model="sex" value="male">' +        '</div>')($rootScope);      var female = jqLite(element[0].childNodes[0]);      var male = jqLite(element[0].childNodes[1]); @@ -462,25 +462,25 @@ describe('Binder', function() {    it('ItShouldRepeatOnHashes', inject(function($rootScope, $compile) {      element = $compile(        '<ul>' + -        '<li ng:repeat="(k,v) in {a:0,b:1}" ng:bind=\"k + v\"></li>' + +        '<li ng-repeat="(k,v) in {a:0,b:1}" ng-bind=\"k + v\"></li>' +        '</ul>')($rootScope);      $rootScope.$apply();      expect(sortedHtml(element)).toBe(          '<ul>' +            '<#comment></#comment>' + -          '<li ng:bind=\"k + v\" ng:repeat="(k,v) in {a:0,b:1}">a0</li>' + -          '<li ng:bind=\"k + v\" ng:repeat="(k,v) in {a:0,b:1}">b1</li>' + +          '<li ng-bind=\"k + v\" ng-repeat="(k,v) in {a:0,b:1}">a0</li>' + +          '<li ng-bind=\"k + v\" ng-repeat="(k,v) in {a:0,b:1}">b1</li>' +          '</ul>');    }));    it('ItShouldFireChangeListenersBeforeUpdate', inject(function($rootScope, $compile) { -    element = $compile('<div ng:bind="name"></div>')($rootScope); +    element = $compile('<div ng-bind="name"></div>')($rootScope);      $rootScope.name = '';      $rootScope.$watch('watched', 'name=123');      $rootScope.watched = 'change';      $rootScope.$apply();      expect($rootScope.name).toBe(123); -    expect(sortedHtml(element)).toBe('<div ng:bind="name">123</div>'); +    expect(sortedHtml(element)).toBe('<div ng-bind="name">123</div>');    }));    it('ItShouldHandleMultilineBindings', inject(function($rootScope, $compile) { diff --git a/test/ScenarioSpec.js b/test/ScenarioSpec.js index 2070d301..cc2efd1e 100644 --- a/test/ScenarioSpec.js +++ b/test/ScenarioSpec.js @@ -10,7 +10,7 @@ describe("ScenarioSpec: Compilation", function() {    describe('compilation', function() {      it("should compile dom node and return scope", inject(function($rootScope, $compile) { -      var node = jqLite('<div ng:init="a=1">{{b=a+1}}</div>')[0]; +      var node = jqLite('<div ng-init="a=1">{{b=a+1}}</div>')[0];        element = $compile(node)($rootScope);        $rootScope.$digest();        expect($rootScope.a).toEqual(1); diff --git a/test/directive/booleanAttrDirSpecs.js b/test/directive/booleanAttrDirSpecs.js index 2c47d81a..8d71c2d8 100644 --- a/test/directive/booleanAttrDirSpecs.js +++ b/test/directive/booleanAttrDirSpecs.js @@ -9,7 +9,7 @@ describe('boolean attr directives', function() {    it('should bind href', inject(function($rootScope, $compile) { -    element = $compile('<a ng:href="{{url}}"></a>')($rootScope) +    element = $compile('<a ng-href="{{url}}"></a>')($rootScope)      $rootScope.url = 'http://server'      $rootScope.$digest();      expect(element.attr('href')).toEqual('http://server'); @@ -17,7 +17,7 @@ describe('boolean attr directives', function() {    it('should bind disabled', inject(function($rootScope, $compile) { -    element = $compile('<button ng:disabled="{{isDisabled}}">Button</button>')($rootScope) +    element = $compile('<button ng-disabled="{{isDisabled}}">Button</button>')($rootScope)      $rootScope.isDisabled = false;      $rootScope.$digest();      expect(element.attr('disabled')).toBeFalsy(); @@ -28,7 +28,7 @@ describe('boolean attr directives', function() {    it('should bind checked', inject(function($rootScope, $compile) { -    element = $compile('<input type="checkbox" ng:checked="{{isChecked}}" />')($rootScope) +    element = $compile('<input type="checkbox" ng-checked="{{isChecked}}" />')($rootScope)      $rootScope.isChecked = false;      $rootScope.$digest();      expect(element.attr('checked')).toBeFalsy(); @@ -39,7 +39,7 @@ describe('boolean attr directives', function() {    it('should bind selected', inject(function($rootScope, $compile) { -    element = $compile('<select><option value=""></option><option ng:selected="{{isSelected}}">Greetings!</option></select>')($rootScope) +    element = $compile('<select><option value=""></option><option ng-selected="{{isSelected}}">Greetings!</option></select>')($rootScope)      jqLite(document.body).append(element)      $rootScope.isSelected=false;      $rootScope.$digest(); @@ -51,7 +51,7 @@ describe('boolean attr directives', function() {    it('should bind readonly', inject(function($rootScope, $compile) { -    element = $compile('<input type="text" ng:readonly="{{isReadonly}}" />')($rootScope) +    element = $compile('<input type="text" ng-readonly="{{isReadonly}}" />')($rootScope)      $rootScope.isReadonly=false;      $rootScope.$digest();      expect(element.attr('readOnly')).toBeFalsy(); @@ -62,7 +62,7 @@ describe('boolean attr directives', function() {    it('should bind multiple', inject(function($rootScope, $compile) { -    element = $compile('<select ng:multiple="{{isMultiple}}"></select>')($rootScope) +    element = $compile('<select ng-multiple="{{isMultiple}}"></select>')($rootScope)      $rootScope.isMultiple=false;      $rootScope.$digest();      expect(element.attr('multiple')).toBeFalsy(); @@ -73,7 +73,7 @@ describe('boolean attr directives', function() {    it('should bind src', inject(function($rootScope, $compile) { -    element = $compile('<div ng:src="{{url}}" />')($rootScope) +    element = $compile('<div ng-src="{{url}}" />')($rootScope)      $rootScope.url = 'http://localhost/';      $rootScope.$digest();      expect(element.attr('src')).toEqual('http://localhost/'); @@ -81,7 +81,7 @@ describe('boolean attr directives', function() {    it('should bind href and merge with other attrs', inject(function($rootScope, $compile) { -    element = $compile('<a ng:href="{{url}}" rel="{{rel}}"></a>')($rootScope); +    element = $compile('<a ng-href="{{url}}" rel="{{rel}}"></a>')($rootScope);      $rootScope.url = 'http://server';      $rootScope.rel = 'REL';      $rootScope.$digest(); @@ -92,18 +92,18 @@ describe('boolean attr directives', function() {    it('should bind Text with no Bindings', inject(function($compile, $rootScope) {      forEach(['checked', 'disabled', 'multiple', 'readonly', 'selected'], function(name) { -      element = $compile('<div ng:' + name + '="some"></div>')($rootScope) +      element = $compile('<div ng-' + name + '="some"></div>')($rootScope)        $rootScope.$digest();        expect(element.attr(name)).toBe(name);        dealoc(element);      }); -    element = $compile('<div ng:src="some"></div>')($rootScope) +    element = $compile('<div ng-src="some"></div>')($rootScope)      $rootScope.$digest();      expect(element.attr('src')).toEqual('some');      dealoc(element); -    element = $compile('<div ng:href="some"></div>')($rootScope) +    element = $compile('<div ng-href="some"></div>')($rootScope)      $rootScope.$digest();      expect(element.attr('href')).toEqual('some');      dealoc(element); diff --git a/test/directive/formSpec.js b/test/directive/formSpec.js index 6387241f..6559da5d 100644 --- a/test/directive/formSpec.js +++ b/test/directive/formSpec.js @@ -34,7 +34,7 @@ describe('form', function() {    it('should remove the widget when element removed', function() {      doc = $compile(          '<form name="form">' + -          '<input type="text" name="alias" ng:model="value" store-model-ctrl/>' + +          '<input type="text" name="alias" ng-model="value" store-model-ctrl/>' +          '</form>')(scope);      var form = scope.form; @@ -150,7 +150,7 @@ describe('form', function() {    it('should publish widgets', function() { -    doc = jqLite('<form name="form"><input type="text" name="w1" ng:model="some" /></form>'); +    doc = jqLite('<form name="form"><input type="text" name="w1" ng-model="some" /></form>');      $compile(doc)(scope);      var widget = scope.form.w1; @@ -167,7 +167,7 @@ describe('form', function() {      beforeEach(function() {        doc = $compile(            '<form name="form">' + -            '<input type="text" ng:model="name" name="name" store-model-ctrl/>' + +            '<input type="text" ng-model="name" name="name" store-model-ctrl/>' +            '</form>')(scope);        scope.$digest(); diff --git a/test/directive/inputSpec.js b/test/directive/inputSpec.js index 54f3f7cd..5a0c4168 100644 --- a/test/directive/inputSpec.js +++ b/test/directive/inputSpec.js @@ -204,11 +204,11 @@ describe('NgModelController', function() {    });  }); -describe('ng:model', function() { +describe('ng-model', function() {    it('should set css classes (ng-valid, ng-invalid, ng-pristine, ng-dirty)',        inject(function($compile, $rootScope) { -    var element = $compile('<input type="email" ng:model="value" />')($rootScope); +    var element = $compile('<input type="email" ng-model="value" />')($rootScope);      $rootScope.$digest();      expect(element).toBeValid(); @@ -260,7 +260,7 @@ describe('input', function() {    it('should bind to a model', function() { -    compileInput('<input type="text" ng:model="name" name="alias" ng:change="change()" />'); +    compileInput('<input type="text" ng-model="name" name="alias" ng-change="change()" />');      scope.$apply(function() {        scope.name = 'misko'; @@ -271,7 +271,7 @@ describe('input', function() {    it('should call $destroy on element remove', function() { -    compileInput('<input type="text" ng:model="name" name="alias" ng:change="change()" />'); +    compileInput('<input type="text" ng-model="name" name="alias" ng-change="change()" />');      var spy = jasmine.createSpy('on destroy');      scope.$on('$destroy', spy); @@ -282,7 +282,7 @@ describe('input', function() {    it('should update the model on "blur" event', function() { -    compileInput('<input type="text" ng:model="name" name="alias" ng:change="change()" />'); +    compileInput('<input type="text" ng-model="name" name="alias" ng-change="change()" />');      changeInputValueTo('adam');      expect(scope.name).toEqual('adam'); @@ -290,7 +290,7 @@ describe('input', function() {    it('should update the model and trim the value', function() { -    compileInput('<input type="text" ng:model="name" name="alias" ng:change="change()" />'); +    compileInput('<input type="text" ng-model="name" name="alias" ng-change="change()" />');      changeInputValueTo('  a  ');      expect(scope.name).toEqual('a'); @@ -298,7 +298,7 @@ describe('input', function() {    it('should allow complex reference binding', function() { -    compileInput('<input type="text" ng:model="obj[\'abc\'].name"/>'); +    compileInput('<input type="text" ng-model="obj[\'abc\'].name"/>');      scope.$apply(function() {        scope.obj = { abc: { name: 'Misko'} }; @@ -307,7 +307,7 @@ describe('input', function() {    }); -  it('should ignore input without ng:model attr', function() { +  it('should ignore input without ng-model attr', function() {      compileInput('<input type="text" name="whatever" required />');      browserTrigger(inputElm, 'blur'); @@ -320,14 +320,14 @@ describe('input', function() {    it('should report error on assignment error', function() {      expect(function() { -      compileInput('<input type="text" ng:model="throw \'\'">'); +      compileInput('<input type="text" ng-model="throw \'\'">');        scope.$digest();      }).toThrow("Syntax Error: Token '''' is an unexpected token at column 7 of the expression [throw ''] starting at [''].");    });    it("should render as blank if null", function() { -    compileInput('<input type="text" ng:model="age" />'); +    compileInput('<input type="text" ng-model="age" />');      scope.$apply(function() {        scope.age = null; @@ -339,7 +339,7 @@ describe('input', function() {    it('should render 0 even if it is a number', function() { -    compileInput('<input type="text" ng:model="value" />'); +    compileInput('<input type="text" ng-model="value" />');      scope.$apply(function() {        scope.value = 0;      }); @@ -351,7 +351,7 @@ describe('input', function() {    describe('pattern', function() {      it('should validate in-lined pattern', function() { -      compileInput('<input type="text" ng:model="value" ng:pattern="/^\\d\\d\\d-\\d\\d-\\d\\d\\d\\d$/" />'); +      compileInput('<input type="text" ng-model="value" ng-pattern="/^\\d\\d\\d-\\d\\d-\\d\\d\\d\\d$/" />');        scope.$digest();        changeInputValueTo('x000-00-0000x'); @@ -372,7 +372,7 @@ describe('input', function() {      it('should validate pattern from scope', function() { -      compileInput('<input type="text" ng:model="value" ng:pattern="regexp" />'); +      compileInput('<input type="text" ng-model="value" ng-pattern="regexp" />');        scope.regexp = /^\d\d\d-\d\d-\d\d\d\d$/;        scope.$digest(); @@ -402,7 +402,7 @@ describe('input', function() {      xit('should throw an error when scope pattern can\'t be found', function() { -      compileInput('<input type="text" ng:model="foo" ng:pattern="fooRegexp" />'); +      compileInput('<input type="text" ng-model="foo" ng-pattern="fooRegexp" />');        expect(function() { changeInputValueTo('xx'); }).            toThrow('Expected fooRegexp to be a RegExp but was undefined'); @@ -413,7 +413,7 @@ describe('input', function() {    describe('minlength', function() {      it('should invalid shorter than given minlenght', function() { -      compileInput('<input type="text" ng:model="value" ng:minlength="3" />'); +      compileInput('<input type="text" ng-model="value" ng-minlength="3" />');        changeInputValueTo('aa');        expect(scope.value).toBeUndefined(); @@ -427,7 +427,7 @@ describe('input', function() {    describe('maxlength', function() {      it('should invalid shorter than given maxlenght', function() { -      compileInput('<input type="text" ng:model="value" ng:maxlength="5" />'); +      compileInput('<input type="text" ng-model="value" ng-maxlength="5" />');        changeInputValueTo('aaaaaaaa');        expect(scope.value).toBeUndefined(); @@ -443,7 +443,7 @@ describe('input', function() {    describe('number', function() {      it('should not update model if view invalid', function() { -      compileInput('<input type="number" ng:model="age"/>'); +      compileInput('<input type="number" ng-model="age"/>');        scope.$apply(function() {          scope.age = 123; @@ -465,7 +465,7 @@ describe('input', function() {      it('should render as blank if null', function() { -      compileInput('<input type="number" ng:model="age" />'); +      compileInput('<input type="number" ng-model="age" />');        scope.$apply(function() {          scope.age = null; @@ -477,7 +477,7 @@ describe('input', function() {      it('should come up blank when no value specified', function() { -      compileInput('<input type="number" ng:model="age" />'); +      compileInput('<input type="number" ng-model="age" />');        scope.$digest();        expect(inputElm.val()).toBe(''); @@ -492,7 +492,7 @@ describe('input', function() {      it('should parse empty string to null', function() { -      compileInput('<input type="number" ng:model="age" />'); +      compileInput('<input type="number" ng-model="age" />');        scope.$apply(function() {          scope.age = 10; @@ -507,7 +507,7 @@ describe('input', function() {      describe('min', function() {        it('should validate', function() { -        compileInput('<input type="number" ng:model="value" name="alias" min="10" />'); +        compileInput('<input type="number" ng-model="value" name="alias" min="10" />');          scope.$digest();          changeInputValueTo('1'); @@ -526,7 +526,7 @@ describe('input', function() {      describe('max', function() {        it('should validate', function() { -        compileInput('<input type="number" ng:model="value" name="alias" max="10" />'); +        compileInput('<input type="number" ng-model="value" name="alias" max="10" />');          scope.$digest();          changeInputValueTo('20'); @@ -545,7 +545,7 @@ describe('input', function() {      describe('required', function() {        it('should be valid even if value is 0', function() { -        compileInput('<input type="number" ng:model="value" name="alias" required />'); +        compileInput('<input type="number" ng-model="value" name="alias" required />');          changeInputValueTo('0');          expect(inputElm).toBeValid(); @@ -554,7 +554,7 @@ describe('input', function() {        });        it('should be valid even if value 0 is set from model', function() { -        compileInput('<input type="number" ng:model="value" name="alias" required />'); +        compileInput('<input type="number" ng-model="value" name="alias" required />');          scope.$apply(function() {            scope.value = 0; @@ -570,7 +570,7 @@ describe('input', function() {    describe('email', function() {      it('should validate e-mail', function() { -      compileInput('<input type="email" ng:model="email" name="alias" />'); +      compileInput('<input type="email" ng-model="email" name="alias" />');        var widget = scope.form.alias;        changeInputValueTo('vojta@google.com'); @@ -599,7 +599,7 @@ describe('input', function() {    describe('url', function() {      it('should validate url', function() { -      compileInput('<input type="url" ng:model="url" name="alias" />'); +      compileInput('<input type="url" ng-model="url" name="alias" />');        var widget = scope.form.alias;        changeInputValueTo('http://www.something.com'); @@ -628,9 +628,9 @@ describe('input', function() {      it('should update the model', function() {        compileInput( -          '<input type="radio" ng:model="color" value="white" />' + -          '<input type="radio" ng:model="color" value="red" />' + -          '<input type="radio" ng:model="color" value="blue" />'); +          '<input type="radio" ng-model="color" value="white" />' + +          '<input type="radio" ng-model="color" value="red" />' + +          '<input type="radio" ng-model="color" value="blue" />');        scope.$apply(function() {          scope.color = 'white'; @@ -655,8 +655,8 @@ describe('input', function() {      xit('should allow {{expr}} as value', function() {        scope.some = 11;        compileInput( -          '<input type="radio" ng:model="value" value="{{some}}" />' + -          '<input type="radio" ng:model="value" value="{{other}}" />'); +          '<input type="radio" ng-model="value" value="{{some}}" />' + +          '<input type="radio" ng-model="value" value="{{other}}" />');        browserTrigger(inputElm[0]);        expect(scope.value).toBe(true); @@ -669,7 +669,7 @@ describe('input', function() {    describe('checkbox', function() { -    it('should ignore checkbox without ng:model attr', function() { +    it('should ignore checkbox without ng-model attr', function() {        compileInput('<input type="checkbox" name="whatever" required />');        browserTrigger(inputElm, 'blur'); @@ -681,7 +681,7 @@ describe('input', function() {      it('should format booleans', function() { -      compileInput('<input type="checkbox" ng:model="name" />'); +      compileInput('<input type="checkbox" ng-model="name" />');        scope.$apply(function() {          scope.name = false; @@ -696,7 +696,7 @@ describe('input', function() {      it('should support type="checkbox" with non-standard capitalization', function() { -      compileInput('<input type="checkBox" ng:model="checkbox" />'); +      compileInput('<input type="checkBox" ng-model="checkbox" />');        browserTrigger(inputElm, 'click');        expect(scope.checkbox).toBe(true); @@ -707,8 +707,8 @@ describe('input', function() {      it('should allow custom enumeration', function() { -      compileInput('<input type="checkbox" ng:model="name" ng:true-value="y" ' + -          'ng:false-value="n">'); +      compileInput('<input type="checkbox" ng-model="name" ng-true-value="y" ' + +          'ng-false-value="n">');        scope.$apply(function() {          scope.name = 'y'; @@ -737,7 +737,7 @@ describe('input', function() {    describe('textarea', function() {      it("should process textarea", function() { -      compileInput('<textarea ng:model="name"></textarea>'); +      compileInput('<textarea ng-model="name"></textarea>');        inputElm = formElm.find('textarea');        scope.$apply(function() { @@ -753,7 +753,7 @@ describe('input', function() {      }); -    it('should ignore textarea without ng:model attr', function() { +    it('should ignore textarea without ng-model attr', function() {        compileInput('<textarea name="whatever" required></textarea>');        inputElm = formElm.find('textarea'); @@ -766,10 +766,10 @@ describe('input', function() {    }); -  describe('ng:list', function() { +  describe('ng-list', function() {      it('should parse text into an array', function() { -      compileInput('<input type="text" ng:model="list" ng:list />'); +      compileInput('<input type="text" ng-model="list" ng-list />');        // model -> view        scope.$apply(function() { @@ -787,7 +787,7 @@ describe('input', function() {        // When the user types 'a,b' the 'a,' stage parses to ['a'] but if the        // $parseModel function runs it will change to 'a', in essence preventing        // the user from ever typying ','. -      compileInput('<input type="text" ng:model="list" ng:list />'); +      compileInput('<input type="text" ng-model="list" ng-list />');        changeInputValueTo('a ');        expect(inputElm.val()).toEqual('a '); @@ -808,7 +808,7 @@ describe('input', function() {      xit('should require at least one item', function() { -      compileInput('<input type="text" ng:model="list" ng:list required />'); +      compileInput('<input type="text" ng-model="list" ng-list required />');        changeInputValueTo(' , ');        expect(inputElm).toBeInvalid(); @@ -816,7 +816,7 @@ describe('input', function() {      it('should convert empty string to an empty array', function() { -      compileInput('<input type="text" ng:model="list" ng:list />'); +      compileInput('<input type="text" ng-model="list" ng-list />');        changeInputValueTo('');        expect(scope.list).toEqual([]); @@ -826,7 +826,7 @@ describe('input', function() {    describe('required', function() {      it('should allow bindings on required', function() { -      compileInput('<input type="text" ng:model="value" required="{{required}}" />'); +      compileInput('<input type="text" ng-model="value" required="{{required}}" />');        scope.$apply(function() {          scope.required = false; @@ -857,7 +857,7 @@ describe('input', function() {      it('should invalid initial value with bound required', function() { -      compileInput('<input type="text" ng:model="value" required="{{required}}" />'); +      compileInput('<input type="text" ng-model="value" required="{{required}}" />');        scope.$apply(function() {          scope.required = true; @@ -868,7 +868,7 @@ describe('input', function() {      it('should be $invalid but $pristine if not touched', function() { -      compileInput('<input type="text" ng:model="name" name="alias" required />'); +      compileInput('<input type="text" ng-model="name" name="alias" required />');        scope.$apply(function() {          scope.name = ''; @@ -884,7 +884,7 @@ describe('input', function() {      it('should allow empty string if not required', function() { -      compileInput('<input type="text" ng:model="foo" />'); +      compileInput('<input type="text" ng-model="foo" />');        changeInputValueTo('a');        changeInputValueTo('');        expect(scope.foo).toBe(''); @@ -892,17 +892,17 @@ describe('input', function() {      it('should set $invalid when model undefined', function() { -      compileInput('<input type="text" ng:model="notDefiend" required />'); +      compileInput('<input type="text" ng-model="notDefiend" required />');        scope.$digest();        expect(inputElm).toBeInvalid();      })    }); -  describe('ng:change', function() { +  describe('ng-change', function() {      it('should $eval expression after new value is set in the model', function() { -      compileInput('<input type="text" ng:model="value" ng:change="change()" />'); +      compileInput('<input type="text" ng-model="value" ng-change="change()" />');        scope.change = jasmine.createSpy('change').andCallFake(function() {          expect(scope.value).toBe('new value'); @@ -913,7 +913,7 @@ describe('input', function() {      });      it('should not $eval the expression if changed from model', function() { -      compileInput('<input type="text" ng:model="value" ng:change="change()" />'); +      compileInput('<input type="text" ng-model="value" ng-change="change()" />');        scope.change = jasmine.createSpy('change');        scope.$apply(function() { @@ -924,8 +924,8 @@ describe('input', function() {      }); -    it('should $eval ng:change expression on checkbox', function() { -      compileInput('<input type="checkbox" ng:model="foo" ng:change="changeFn()">'); +    it('should $eval ng-change expression on checkbox', function() { +      compileInput('<input type="checkbox" ng-model="foo" ng-change="changeFn()">');        scope.changeFn = jasmine.createSpy('changeFn');        scope.$digest(); @@ -937,10 +937,10 @@ describe('input', function() {    }); -  describe('ng:model-instant', function() { +  describe('ng-model-instant', function() {      it('should bind keydown, change, input events', inject(function($browser) { -      compileInput('<input type="text" ng:model="value" ng:model-instant />'); +      compileInput('<input type="text" ng-model="value" ng-model-instant />');        inputElm.val('value1');        browserTrigger(inputElm, 'keydown'); diff --git a/test/directive/ngBindSpec.js b/test/directive/ngBindSpec.js index e8c07494..ddfdd53d 100644 --- a/test/directive/ngBindSpec.js +++ b/test/directive/ngBindSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:bind-*', function() { +describe('ng-bind-*', function() {    var element; @@ -9,10 +9,10 @@ describe('ng:bind-*', function() {    }); -  describe('ng:bind', function() { +  describe('ng-bind', function() {      it('should set text', inject(function($rootScope, $compile) { -      element = $compile('<div ng:bind="a"></div>')($rootScope); +      element = $compile('<div ng-bind="a"></div>')($rootScope);        expect(element.text()).toEqual('');        $rootScope.a = 'misko';        $rootScope.$digest(); @@ -21,7 +21,7 @@ describe('ng:bind-*', function() {      }));      it('should set text to blank if undefined', inject(function($rootScope, $compile) { -      element = $compile('<div ng:bind="a"></div>')($rootScope); +      element = $compile('<div ng-bind="a"></div>')($rootScope);        $rootScope.a = 'misko';        $rootScope.$digest();        expect(element.text()).toEqual('misko'); @@ -34,14 +34,14 @@ describe('ng:bind-*', function() {      }));      it('should set html', inject(function($rootScope, $compile) { -      element = $compile('<div ng:bind-html="html"></div>')($rootScope); +      element = $compile('<div ng-bind-html="html"></div>')($rootScope);        $rootScope.html = '<div unknown>hello</div>';        $rootScope.$digest();        expect(lowercase(element.html())).toEqual('<div>hello</div>');      }));      it('should set unsafe html', inject(function($rootScope, $compile) { -      element = $compile('<div ng:bind-html-unsafe="html"></div>')($rootScope); +      element = $compile('<div ng-bind-html-unsafe="html"></div>')($rootScope);        $rootScope.html = '<div onclick="">hello</div>';        $rootScope.$digest();        expect(lowercase(element.html())).toEqual('<div onclick="">hello</div>'); @@ -61,10 +61,10 @@ describe('ng:bind-*', function() {    }); -  describe('ng:bind-template', function() { +  describe('ng-bind-template', function() { -    it('should ng:bind-template', inject(function($rootScope, $compile) { -      element = $compile('<div ng:bind-template="Hello {{name}}!"></div>')($rootScope); +    it('should ng-bind-template', inject(function($rootScope, $compile) { +      element = $compile('<div ng-bind-template="Hello {{name}}!"></div>')($rootScope);        $rootScope.name = 'Misko';        $rootScope.$digest();        expect(element.hasClass('ng-binding')).toEqual(true); @@ -79,9 +79,9 @@ describe('ng:bind-*', function() {    }); -  describe('ng:bind-attr', function() { +  describe('ng-bind-attr', function() {      it('should bind attributes', inject(function($rootScope, $compile) { -      element = $compile('<div ng:bind-attr="{src:\'http://localhost/mysrc\', alt:\'myalt\'}"/>')($rootScope); +      element = $compile('<div ng-bind-attr="{src:\'http://localhost/mysrc\', alt:\'myalt\'}"/>')($rootScope);        $rootScope.$digest();        expect(element.attr('src')).toEqual('http://localhost/mysrc');        expect(element.attr('alt')).toEqual('myalt'); @@ -94,7 +94,7 @@ describe('ng:bind-*', function() {      }));      it('should remove special attributes on false', inject(function($rootScope, $compile) { -      element = $compile('<input ng:bind-attr="{disabled:\'{{disabled}}\', readonly:\'{{readonly}}\', checked:\'{{checked}}\'}"/>')($rootScope); +      element = $compile('<input ng-bind-attr="{disabled:\'{{disabled}}\', readonly:\'{{readonly}}\', checked:\'{{checked}}\'}"/>')($rootScope);        var input = element[0];        expect(input.disabled).toEqual(false);        expect(input.readOnly).toEqual(false); diff --git a/test/directive/ngClassSpec.js b/test/directive/ngClassSpec.js index a8b6b17e..2297e343 100644 --- a/test/directive/ngClassSpec.js +++ b/test/directive/ngClassSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:class', function() { +describe('ng-class', function() {    var element; @@ -10,7 +10,7 @@ describe('ng:class', function() {    it('should add new and remove old classes dynamically', inject(function($rootScope, $compile) { -    element = $compile('<div class="existing" ng:class="dynClass"></div>')($rootScope); +    element = $compile('<div class="existing" ng-class="dynClass"></div>')($rootScope);      $rootScope.dynClass = 'A';      $rootScope.$digest();      expect(element.hasClass('existing')).toBe(true); @@ -31,7 +31,7 @@ describe('ng:class', function() {    it('should support adding multiple classes via an array', inject(function($rootScope, $compile) { -    element = $compile('<div class="existing" ng:class="[\'A\', \'B\']"></div>')($rootScope); +    element = $compile('<div class="existing" ng-class="[\'A\', \'B\']"></div>')($rootScope);      $rootScope.$digest();      expect(element.hasClass('existing')).toBeTruthy();      expect(element.hasClass('A')).toBeTruthy(); @@ -43,7 +43,7 @@ describe('ng:class', function() {        'expressions', inject(function($rootScope, $compile) {      var element = $compile(          '<div class="existing" ' + -            'ng:class="{A: conditionA, B: conditionB(), AnotB: conditionA&&!conditionB}">' + +            'ng-class="{A: conditionA, B: conditionB(), AnotB: conditionA&&!conditionB}">' +          '</div>')($rootScope);      $rootScope.conditionA = true;      $rootScope.$digest(); @@ -62,7 +62,7 @@ describe('ng:class', function() {    it('should support adding multiple classes via a space delimited string', inject(function($rootScope, $compile) { -    element = $compile('<div class="existing" ng:class="\'A B\'"></div>')($rootScope); +    element = $compile('<div class="existing" ng-class="\'A B\'"></div>')($rootScope);      $rootScope.$digest();      expect(element.hasClass('existing')).toBeTruthy();      expect(element.hasClass('A')).toBeTruthy(); @@ -71,7 +71,7 @@ describe('ng:class', function() {    it('should preserve class added post compilation with pre-existing classes', inject(function($rootScope, $compile) { -    element = $compile('<div class="existing" ng:class="dynClass"></div>')($rootScope); +    element = $compile('<div class="existing" ng-class="dynClass"></div>')($rootScope);      $rootScope.dynClass = 'A';      $rootScope.$digest();      expect(element.hasClass('existing')).toBe(true); @@ -88,7 +88,7 @@ describe('ng:class', function() {    it('should preserve class added post compilation without pre-existing classes"', inject(function($rootScope, $compile) { -    element = $compile('<div ng:class="dynClass"></div>')($rootScope); +    element = $compile('<div ng-class="dynClass"></div>')($rootScope);      $rootScope.dynClass = 'A';      $rootScope.$digest();      expect(element.hasClass('A')).toBe(true); @@ -104,7 +104,7 @@ describe('ng:class', function() {    it('should preserve other classes with similar name"', inject(function($rootScope, $compile) { -    element = $compile('<div class="ui-panel ui-selected" ng:class="dynCls"></div>')($rootScope); +    element = $compile('<div class="ui-panel ui-selected" ng-class="dynCls"></div>')($rootScope);      $rootScope.dynCls = 'panel';      $rootScope.$digest();      $rootScope.dynCls = 'foo'; @@ -114,7 +114,7 @@ describe('ng:class', function() {    it('should not add duplicate classes', inject(function($rootScope, $compile) { -    element = $compile('<div class="panel bar" ng:class="dynCls"></div>')($rootScope); +    element = $compile('<div class="panel bar" ng-class="dynCls"></div>')($rootScope);      $rootScope.dynCls = 'panel';      $rootScope.$digest();      expect(element[0].className).toBe('panel bar ng-scope'); @@ -122,7 +122,7 @@ describe('ng:class', function() {    it('should remove classes even if it was specified via class attribute', inject(function($rootScope, $compile) { -    element = $compile('<div class="panel bar" ng:class="dynCls"></div>')($rootScope); +    element = $compile('<div class="panel bar" ng-class="dynCls"></div>')($rootScope);      $rootScope.dynCls = 'panel';      $rootScope.$digest();      $rootScope.dynCls = 'window'; @@ -132,7 +132,7 @@ describe('ng:class', function() {    it('should remove classes even if they were added by another code', inject(function($rootScope, $compile) { -    element = $compile('<div ng:class="dynCls"></div>')($rootScope); +    element = $compile('<div ng-class="dynCls"></div>')($rootScope);      $rootScope.dynCls = 'foo';      $rootScope.$digest();      element.addClass('foo'); @@ -142,14 +142,14 @@ describe('ng:class', function() {    it('should convert undefined and null values to an empty string', inject(function($rootScope, $compile) { -    element = $compile('<div ng:class="dynCls"></div>')($rootScope); +    element = $compile('<div ng-class="dynCls"></div>')($rootScope);      $rootScope.dynCls = [undefined, null];      $rootScope.$digest();    })); -  it('should ng:class odd/even', inject(function($rootScope, $compile) { -    element = $compile('<ul><li ng:repeat="i in [0,1]" class="existing" ng:class-odd="\'odd\'" ng:class-even="\'even\'"></li><ul>')($rootScope); +  it('should ng-class odd/even', inject(function($rootScope, $compile) { +    element = $compile('<ul><li ng-repeat="i in [0,1]" class="existing" ng-class-odd="\'odd\'" ng-class-even="\'even\'"></li><ul>')($rootScope);      $rootScope.$digest();      var e1 = jqLite(element[0].childNodes[1]);      var e2 = jqLite(element[0].childNodes[2]); @@ -160,10 +160,10 @@ describe('ng:class', function() {    })); -  it('should allow both ng:class and ng:class-odd/even on the same element', inject(function($rootScope, $compile) { +  it('should allow both ng-class and ng-class-odd/even on the same element', inject(function($rootScope, $compile) {      element = $compile('<ul>' + -      '<li ng:repeat="i in [0,1]" ng:class="\'plainClass\'" ' + -      'ng:class-odd="\'odd\'" ng:class-even="\'even\'"></li>' + +      '<li ng-repeat="i in [0,1]" ng-class="\'plainClass\'" ' + +      'ng-class-odd="\'odd\'" ng-class-even="\'even\'"></li>' +        '<ul>')($rootScope);      $rootScope.$apply();      var e1 = jqLite(element[0].childNodes[1]); @@ -178,10 +178,10 @@ describe('ng:class', function() {    })); -  it('should allow both ng:class and ng:class-odd/even with multiple classes', inject(function($rootScope, $compile) { +  it('should allow both ng-class and ng-class-odd/even with multiple classes', inject(function($rootScope, $compile) {      element = $compile('<ul>' + -      '<li ng:repeat="i in [0,1]" ng:class="[\'A\', \'B\']" ' + -      'ng:class-odd="[\'C\', \'D\']" ng:class-even="[\'E\', \'F\']"></li>' + +      '<li ng-repeat="i in [0,1]" ng-class="[\'A\', \'B\']" ' + +      'ng-class-odd="[\'C\', \'D\']" ng-class-even="[\'E\', \'F\']"></li>' +        '<ul>')($rootScope);      $rootScope.$apply();      var e1 = jqLite(element[0].childNodes[1]); diff --git a/test/directive/ngClickSpec.js b/test/directive/ngClickSpec.js index cb52901c..f5086d1c 100644 --- a/test/directive/ngClickSpec.js +++ b/test/directive/ngClickSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:click', function() { +describe('ng-click', function() {    var element;    afterEach(function() { @@ -8,7 +8,7 @@ describe('ng:click', function() {    });    it('should get called on a click', inject(function($rootScope, $compile) { -    element = $compile('<div ng:click="clicked = true"></div>')($rootScope); +    element = $compile('<div ng-click="clicked = true"></div>')($rootScope);      $rootScope.$digest();      expect($rootScope.clicked).toBeFalsy(); @@ -17,7 +17,7 @@ describe('ng:click', function() {    }));    it('should pass event object', inject(function($rootScope, $compile) { -    element = $compile('<div ng:click="event = $event"></div>')($rootScope); +    element = $compile('<div ng-click="event = $event"></div>')($rootScope);      $rootScope.$digest();      browserTrigger(element, 'click'); diff --git a/test/directive/ngCloakSpec.js b/test/directive/ngCloakSpec.js index bd911f35..f3c28b60 100644 --- a/test/directive/ngCloakSpec.js +++ b/test/directive/ngCloakSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:cloak', function() { +describe('ng-cloak', function() {    var element; @@ -10,16 +10,16 @@ describe('ng:cloak', function() {    it('should get removed when an element is compiled', inject(function($rootScope, $compile) { -    element = jqLite('<div ng:cloak></div>'); -    expect(element.attr('ng:cloak')).toBe(''); +    element = jqLite('<div ng-cloak></div>'); +    expect(element.attr('ng-cloak')).toBe('');      $compile(element); -    expect(element.attr('ng:cloak')).toBeUndefined(); +    expect(element.attr('ng-cloak')).toBeUndefined();    }));    it('should remove ng-cloak class from a compiled element with attribute', inject(        function($rootScope, $compile) { -    element = jqLite('<div ng:cloak class="foo ng-cloak bar"></div>'); +    element = jqLite('<div ng-cloak class="foo ng-cloak bar"></div>');      expect(element.hasClass('foo')).toBe(true);      expect(element.hasClass('ng-cloak')).toBe(true); diff --git a/test/directive/ngControllerSpec.js b/test/directive/ngControllerSpec.js index 3ab6b929..832a683d 100644 --- a/test/directive/ngControllerSpec.js +++ b/test/directive/ngControllerSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:controller', function() { +describe('ng-controller', function() {    var element;    beforeEach(inject(function($window) { @@ -35,19 +35,19 @@ describe('ng:controller', function() {    it('should instantiate controller and bind methods', inject(function($compile, $rootScope) { -    element = $compile('<div ng:controller="Greeter">{{greet(name)}}</div>')($rootScope); +    element = $compile('<div ng-controller="Greeter">{{greet(name)}}</div>')($rootScope);      $rootScope.$digest();      expect(element.text()).toBe('Hello Misko!');    }));    it('should allow nested controllers', inject(function($compile, $rootScope) { -    element = $compile('<div ng:controller="Greeter"><div ng:controller="Child">{{greet(name)}}</div></div>')($rootScope); +    element = $compile('<div ng-controller="Greeter"><div ng-controller="Child">{{greet(name)}}</div></div>')($rootScope);      $rootScope.$digest();      expect(element.text()).toBe('Hello Adam!');      dealoc(element); -    element = $compile('<div ng:controller="Greeter"><div ng:controller="Child">{{protoGreet(name)}}</div></div>')($rootScope); +    element = $compile('<div ng-controller="Greeter"><div ng-controller="Child">{{protoGreet(name)}}</div></div>')($rootScope);      $rootScope.$digest();      expect(element.text()).toBe('Hello Adam!');    })); @@ -58,7 +58,7 @@ describe('ng:controller', function() {        $scope.name = 'Vojta';      }; -    element = $compile('<div ng:controller="Greeter">{{name}}</div>')($rootScope); +    element = $compile('<div ng-controller="Greeter">{{name}}</div>')($rootScope);      $rootScope.$digest();      expect(element.text()).toBe('Vojta');    })); diff --git a/test/directive/ngEventDirsSpec.js b/test/directive/ngEventDirsSpec.js index 2b14bb33..c42f9b26 100644 --- a/test/directive/ngEventDirsSpec.js +++ b/test/directive/ngEventDirsSpec.js @@ -9,10 +9,10 @@ describe('event directives', function() {    }); -  describe('ng:submit', function() { +  describe('ng-submit', function() {      it('should get called on form submit', inject(function($rootScope, $compile) { -      element = $compile('<form action="" ng:submit="submitted = true">' + +      element = $compile('<form action="" ng-submit="submitted = true">' +          '<input type="submit"/>' +          '</form>')($rootScope);        $rootScope.$digest(); diff --git a/test/directive/ngIncludeSpec.js b/test/directive/ngIncludeSpec.js index dc761abc..32d760c3 100644 --- a/test/directive/ngIncludeSpec.js +++ b/test/directive/ngIncludeSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:include', function() { +describe('ng-include', function() {    var element; @@ -19,12 +19,14 @@ describe('ng:include', function() {    it('should include on external file', inject(putIntoCache('myUrl', '{{name}}'),        function($rootScope, $compile, $browser) {      element = jqLite('<ng:include src="url" scope="childScope"></ng:include>'); +    jqLite(document.body).append(element);      element = $compile(element)($rootScope);      $rootScope.childScope = $rootScope.$new();      $rootScope.childScope.name = 'misko';      $rootScope.url = 'myUrl';      $rootScope.$digest();      expect(element.text()).toEqual('misko'); +    jqLite(document.body).html('');    })); @@ -56,7 +58,7 @@ describe('ng:include', function() {      // TODO(misko): because we are using scope==this, the eval gets registered      // during the flush phase and hence does not get called. -    // I don't think passing 'this' makes sense. Does having scope on ng:include makes sense? +    // I don't think passing 'this' makes sense. Does having scope on ng-include makes sense?      // should we make scope="this" illegal?      $rootScope.$digest(); @@ -197,7 +199,7 @@ describe('ng:include', function() {      $rootScope.$on('$includeContentLoaded', onload);      $templateCache.put('tpl.html', [200, 'partial {{tpl}}', {}]); -    element = $compile('<div><div ng:repeat="i in [1]">' + +    element = $compile('<div><div ng-repeat="i in [1]">' +          '<ng:include src="tpl"></ng:include></div></div>')($rootScope);      expect(onload).not.toHaveBeenCalled(); diff --git a/test/directive/ngInitSpec.js b/test/directive/ngInitSpec.js index b096c7fd..92146089 100644 --- a/test/directive/ngInitSpec.js +++ b/test/directive/ngInitSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:init', function() { +describe('ng-init', function() {    var element; @@ -9,8 +9,8 @@ describe('ng:init', function() {    }); -  it("should ng:init", inject(function($rootScope, $compile) { -    element = $compile('<div ng:init="a=123"></div>')($rootScope); +  it("should ng-init", inject(function($rootScope, $compile) { +    element = $compile('<div ng-init="a=123"></div>')($rootScope);      expect($rootScope.a).toEqual(123);    }));  }); diff --git a/test/directive/ngNonBindableSpec.js b/test/directive/ngNonBindableSpec.js index c974948d..8b745364 100644 --- a/test/directive/ngNonBindableSpec.js +++ b/test/directive/ngNonBindableSpec.js @@ -1,7 +1,7 @@  'use strict'; -describe('ng:non-bindable', function() { +describe('ng-non-bindable', function() {    var element; @@ -12,7 +12,7 @@ describe('ng:non-bindable', function() {    it('should prevent compilation of the owning element and its children',        inject(function($rootScope, $compile) { -    element = $compile('<div ng:non-bindable><span ng:bind="name"></span></div>')($rootScope); +    element = $compile('<div ng-non-bindable><span ng-bind="name"></span></div>')($rootScope);      $rootScope.name =  'misko';      $rootScope.$digest();      expect(element.text()).toEqual(''); diff --git a/test/directive/ngPluralizeSpec.js b/test/directive/ngPluralizeSpec.js index 8046f45f..c7766c7b 100644 --- a/test/directive/ngPluralizeSpec.js +++ b/test/directive/ngPluralizeSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:pluralize', function() { +describe('ng-pluralize', function() {    var element; diff --git a/test/directive/ngRepeatSpec.js b/test/directive/ngRepeatSpec.js index 8400edaa..8b6a5173 100644 --- a/test/directive/ngRepeatSpec.js +++ b/test/directive/ngRepeatSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:repeat', function() { +describe('ng-repeat', function() {    var element; @@ -9,10 +9,10 @@ describe('ng:repeat', function() {    }); -  it('should ng:repeat over array', inject(function($rootScope, $compile) { +  it('should ng-repeat over array', inject(function($rootScope, $compile) {      element = $compile(        '<ul>' + -        '<li ng:repeat="item in items" ng:init="suffix = \';\'" ng:bind="item + suffix"></li>' + +        '<li ng-repeat="item in items" ng-init="suffix = \';\'" ng-bind="item + suffix"></li>' +        '</ul>')($rootScope);      Array.prototype.extraProperty = "should be ignored"; @@ -37,10 +37,10 @@ describe('ng:repeat', function() {    })); -  it('should ng:repeat over object', inject(function($rootScope, $compile) { +  it('should ng-repeat over object', inject(function($rootScope, $compile) {      element = $compile(        '<ul>' + -        '<li ng:repeat="(key, value) in items" ng:bind="key + \':\' + value + \';\' "></li>' + +        '<li ng-repeat="(key, value) in items" ng-bind="key + \':\' + value + \';\' "></li>' +        '</ul>')($rootScope);      $rootScope.items = {misko:'swe', shyam:'set'};      $rootScope.$digest(); @@ -48,14 +48,14 @@ describe('ng:repeat', function() {    })); -  it('should not ng:repeat over parent properties', inject(function($rootScope, $compile) { +  it('should not ng-repeat over parent properties', inject(function($rootScope, $compile) {      var Class = function() {};      Class.prototype.abc = function() {};      Class.prototype.value = 'abc';      element = $compile(        '<ul>' + -        '<li ng:repeat="(key, value) in items" ng:bind="key + \':\' + value + \';\' "></li>' + +        '<li ng-repeat="(key, value) in items" ng-bind="key + \':\' + value + \';\' "></li>' +        '</ul>')($rootScope);      $rootScope.items = new Class();      $rootScope.items.name = 'value'; @@ -64,10 +64,10 @@ describe('ng:repeat', function() {    })); -  it('should error on wrong parsing of ng:repeat', inject(function($rootScope, $compile, $log) { +  it('should error on wrong parsing of ng-repeat', inject(function($rootScope, $compile, $log) {      expect(function() { -      element = $compile('<ul><li ng:repeat="i dont parse"></li></ul>')($rootScope); -    }).toThrow("Expected ng:repeat in form of '_item_ in _collection_' but got 'i dont parse'."); +      element = $compile('<ul><li ng-repeat="i dont parse"></li></ul>')($rootScope); +    }).toThrow("Expected ng-repeat in form of '_item_ in _collection_' but got 'i dont parse'.");      $log.error.logs.shift();    })); @@ -77,7 +77,7 @@ describe('ng:repeat', function() {        inject(function($rootScope, $compile) {      element = $compile(        '<ul>' + -        '<li ng:repeat="item in items" ng:bind="item + $index + \'|\'"></li>' + +        '<li ng-repeat="item in items" ng-bind="item + $index + \'|\'"></li>' +        '</ul>')($rootScope);      $rootScope.items = ['misko', 'shyam', 'frodo'];      $rootScope.$digest(); @@ -89,7 +89,7 @@ describe('ng:repeat', function() {        inject(function($rootScope, $compile) {      element = $compile(        '<ul>' + -        '<li ng:repeat="(key, val) in items" ng:bind="key + \':\' + val + $index + \'|\'"></li>' + +        '<li ng-repeat="(key, val) in items" ng-bind="key + \':\' + val + $index + \'|\'"></li>' +        '</ul>')($rootScope);      $rootScope.items = {'misko':'m', 'shyam':'s', 'frodo':'f'};      $rootScope.$digest(); @@ -101,7 +101,7 @@ describe('ng:repeat', function() {        inject(function($rootScope, $compile) {      element = $compile(        '<ul>' + -        '<li ng:repeat="item in items" ng:bind="item + \':\' + $position + \'|\'"></li>' + +        '<li ng-repeat="item in items" ng-bind="item + \':\' + $position + \'|\'"></li>' +        '</ul>')($rootScope);      $rootScope.items = ['misko', 'shyam', 'doug'];      $rootScope.$digest(); @@ -122,7 +122,7 @@ describe('ng:repeat', function() {        inject(function($rootScope, $compile) {      element = $compile(        '<ul>' + -        '<li ng:repeat="(key, val) in items" ng:bind="key + \':\' + val + \':\' + $position + \'|\'">' + +        '<li ng-repeat="(key, val) in items" ng-bind="key + \':\' + val + \':\' + $position + \'|\'">' +          '</li>' +        '</ul>')($rootScope);      $rootScope.items = {'misko':'m', 'shyam':'s', 'doug':'d', 'frodo':'f'}; @@ -137,7 +137,7 @@ describe('ng:repeat', function() {    it('should ignore $ and $$ properties', inject(function($rootScope, $compile) { -    element = $compile('<ul><li ng:repeat="i in items">{{i}}|</li></ul>')($rootScope); +    element = $compile('<ul><li ng-repeat="i in items">{{i}}|</li></ul>')($rootScope);      $rootScope.items = ['a', 'b', 'c'];      $rootScope.items.$$hashkey = 'xxx';      $rootScope.items.$root = 'yyy'; @@ -150,8 +150,8 @@ describe('ng:repeat', function() {    it('should repeat over nested arrays', inject(function($rootScope, $compile) {      element = $compile(        '<ul>' + -        '<li ng:repeat="subgroup in groups">' + -          '<div ng:repeat="group in subgroup">{{group}}|</div>X' + +        '<li ng-repeat="subgroup in groups">' + +          '<div ng-repeat="group in subgroup">{{group}}|</div>X' +          '</li>' +        '</ul>')($rootScope);      $rootScope.groups = [['a', 'b'], ['c','d']]; @@ -163,7 +163,7 @@ describe('ng:repeat', function() {    it('should ignore non-array element properties when iterating over an array',        inject(function($rootScope, $compile) { -    element = $compile('<ul><li ng:repeat="item in array">{{item}}|</li></ul>')($rootScope); +    element = $compile('<ul><li ng-repeat="item in array">{{item}}|</li></ul>')($rootScope);      $rootScope.array = ['a', 'b', 'c'];      $rootScope.array.foo = '23';      $rootScope.array.bar = function() {}; @@ -175,7 +175,7 @@ describe('ng:repeat', function() {    it('should iterate over non-existent elements of a sparse array',        inject(function($rootScope, $compile) { -    element = $compile('<ul><li ng:repeat="item in array">{{item}}|</li></ul>')($rootScope); +    element = $compile('<ul><li ng-repeat="item in array">{{item}}|</li></ul>')($rootScope);      $rootScope.array = ['a', 'b'];      $rootScope.array[4] = 'c';      $rootScope.array[6] = 'd'; @@ -186,7 +186,7 @@ describe('ng:repeat', function() {    it('should iterate over all kinds of types', inject(function($rootScope, $compile) { -    element = $compile('<ul><li ng:repeat="item in array">{{item}}|</li></ul>')($rootScope); +    element = $compile('<ul><li ng-repeat="item in array">{{item}}|</li></ul>')($rootScope);      $rootScope.array = ['a', 1, null, undefined, {}];      $rootScope.$digest(); @@ -200,7 +200,7 @@ describe('ng:repeat', function() {      beforeEach(inject(function($rootScope, $compile) {        element = $compile(          '<ul>' + -          '<li ng:repeat="item in items" ng:bind="key + \':\' + val + \':\' + $position + \'|\'"></li>' + +          '<li ng-repeat="item in items" ng-bind="key + \':\' + val + \':\' + $position + \'|\'"></li>' +          '</ul>')($rootScope);        a = {};        b = {}; diff --git a/test/directive/ngShowHideSpec.js b/test/directive/ngShowHideSpec.js index 6b9aea24..5005274d 100644 --- a/test/directive/ngShowHideSpec.js +++ b/test/directive/ngShowHideSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:show / ng:hide', function() { +describe('ng-show / ng-hide', function() {    var element; @@ -8,9 +8,9 @@ describe('ng:show / ng:hide', function() {      dealoc(element);    }); -  describe('ng:show', function() { +  describe('ng-show', function() {      it('should show and hide an element', inject(function($rootScope, $compile) { -      element = jqLite('<div ng:show="exp"></div>'); +      element = jqLite('<div ng-show="exp"></div>');        element = $compile(element)($rootScope);        $rootScope.$digest();        expect(isCssVisible(element)).toEqual(false); @@ -21,7 +21,7 @@ describe('ng:show / ng:hide', function() {      it('should make hidden element visible', inject(function($rootScope, $compile) { -      element = jqLite('<div style="display: none" ng:show="exp"></div>'); +      element = jqLite('<div style="display: none" ng-show="exp"></div>');        element = $compile(element)($rootScope);        expect(isCssVisible(element)).toBe(false);        $rootScope.exp = true; @@ -30,9 +30,9 @@ describe('ng:show / ng:hide', function() {      }));    }); -  describe('ng:hide', function() { +  describe('ng-hide', function() {      it('should hide an element', inject(function($rootScope, $compile) { -      element = jqLite('<div ng:hide="exp"></div>'); +      element = jqLite('<div ng-hide="exp"></div>');        element = $compile(element)($rootScope);        expect(isCssVisible(element)).toBe(true);        $rootScope.exp = true; diff --git a/test/directive/ngStyleSpec.js b/test/directive/ngStyleSpec.js index a413353b..c12f2f4d 100644 --- a/test/directive/ngStyleSpec.js +++ b/test/directive/ngStyleSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:style', function() { +describe('ng-style', function() {    var element; @@ -10,14 +10,14 @@ describe('ng:style', function() {    it('should set', inject(function($rootScope, $compile) { -    element = $compile('<div ng:style="{height: \'40px\'}"></div>')($rootScope); +    element = $compile('<div ng-style="{height: \'40px\'}"></div>')($rootScope);      $rootScope.$digest();      expect(element.css('height')).toEqual('40px');    }));    it('should silently ignore undefined style', inject(function($rootScope, $compile) { -    element = $compile('<div ng:style="myStyle"></div>')($rootScope); +    element = $compile('<div ng-style="myStyle"></div>')($rootScope);      $rootScope.$digest();      expect(element.hasClass('ng-exception')).toBeFalsy();    })); @@ -31,7 +31,7 @@ describe('ng:style', function() {        preCompVal = '300px';        postCompStyle = 'height';        postCompVal = '100px'; -      element = jqLite('<div ng:style="styleObj"></div>'); +      element = jqLite('<div ng-style="styleObj"></div>');        element.css(preCompStyle, preCompVal);        jqLite(document.body).append(element);        $compile(element)($rootScope); diff --git a/test/directive/ngSwitchSpec.js b/test/directive/ngSwitchSpec.js index 88e81dea..c61dd60d 100644 --- a/test/directive/ngSwitchSpec.js +++ b/test/directive/ngSwitchSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:switch', function() { +describe('ng-switch', function() {    var element; @@ -12,9 +12,9 @@ describe('ng:switch', function() {    it('should switch on value change', inject(function($rootScope, $compile) {      element = $compile(        '<div ng-switch="select">' + -        '<div ng:switch-when="1">first:{{name}}</div>' + -        '<div ng:switch-when="2">second:{{name}}</div>' + -        '<div ng:switch-when="true">true:{{name}}</div>' + +        '<div ng-switch-when="1">first:{{name}}</div>' + +        '<div ng-switch-when="2">second:{{name}}</div>' + +        '<div ng-switch-when="true">true:{{name}}</div>' +        '</div>')($rootScope);      expect(element.html()).toEqual(          '<!-- ngSwitchWhen: 1 --><!-- ngSwitchWhen: 2 --><!-- ngSwitchWhen: true -->'); @@ -53,7 +53,7 @@ describe('ng:switch', function() {    it('should call change on switch', inject(function($rootScope, $compile) {      element = $compile(        '<ng:switch on="url" change="name=\'works\'">' + -        '<div ng:switch-when="a">{{name}}</div>' + +        '<div ng-switch-when="a">{{name}}</div>' +        '</ng:switch>')($rootScope);      $rootScope.url = 'a';      $rootScope.$apply(); diff --git a/test/directive/ngViewSpec.js b/test/directive/ngViewSpec.js index afdded94..2a4347a0 100644 --- a/test/directive/ngViewSpec.js +++ b/test/directive/ngViewSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('ng:view', function() { +describe('ng-view', function() {    var element;    beforeEach(module(function() { @@ -118,7 +118,7 @@ describe('ng:view', function() {    }); -  it('should be possible to nest ng:view in ng:include', inject(function() { +  it('should be possible to nest ng-view in ng-include', inject(function() {      // TODO(vojta): refactor this test      dealoc(element);      var injector = angular.injector(['ng', 'ngMock', function($routeProvider) { @@ -149,7 +149,7 @@ describe('ng:view', function() {    it('should initialize view template after the view controller was initialized even when ' +       'templates were cached', function() { -     //this is a test for a regression that was introduced by making the ng:view cache sync +     //this is a test for a regression that was introduced by making the ng-view cache sync      function ParentCtrl($scope) {         $scope.log.push('parent');      } @@ -168,8 +168,8 @@ describe('ng:view', function() {        $location.path('/foo');        $httpBackend.expect('GET', 'viewPartial.html'). -          respond('<div ng:init="log.push(\'init\')">' + -                    '<div ng:controller="ChildCtrl"></div>' + +          respond('<div ng-init="log.push(\'init\')">' + +                    '<div ng-controller="ChildCtrl"></div>' +                    '</div>');        $rootScope.$apply();        $httpBackend.flush(); diff --git a/test/directive/selectSpec.js b/test/directive/selectSpec.js index c262d0cf..3b4f992e 100644 --- a/test/directive/selectSpec.js +++ b/test/directive/selectSpec.js @@ -23,7 +23,7 @@ describe('select', function() {    describe('select-one', function() { -    it('should compile children of a select without a ng:model, but not create a model for it', +    it('should compile children of a select without a ng-model, but not create a model for it',          function() {        compile('<select>' +                  '<option selected="true">{{a}}</option>' + @@ -41,7 +41,7 @@ describe('select', function() {      it('should require', function() {        compile( -        '<select name="select" ng:model="selection" required ng:change="change()">' + +        '<select name="select" ng-model="selection" required ng-change="change()">' +            '<option value=""></option>' +            '<option value="c">C</option>' +          '</select>'); @@ -78,7 +78,7 @@ describe('select', function() {      it('should not be invalid if no require', function() {        compile( -        '<select name="select" ng:model="selection">' + +        '<select name="select" ng-model="selection">' +            '<option value=""></option>' +            '<option value="c">C</option>' +          '</select>'); @@ -93,7 +93,7 @@ describe('select', function() {      it('should support type="select-multiple"', function() {        compile( -        '<select ng:model="selection" multiple>' + +        '<select ng-model="selection" multiple>' +            '<option>A</option>' +            '<option>B</option>' +          '</select>'); @@ -108,7 +108,7 @@ describe('select', function() {      it('should require', function() {        compile( -        '<select name="select" ng:model="selection" multiple required>' + +        '<select name="select" ng-model="selection" multiple required>' +            '<option>A</option>' +            '<option>B</option>' +          '</select>'); @@ -136,7 +136,7 @@ describe('select', function() {    }); -  describe('ng:options', function() { +  describe('ng-options', function() {      function createSelect(attrs, blank, unknown) {        var html = '<select';        forEach(attrs, function(value, key) { @@ -156,24 +156,24 @@ describe('select', function() {      function createSingleSelect(blank, unknown) {        createSelect({ -        'ng:model':'selected', -        'ng:options':'value.name for value in values' +        'ng-model':'selected', +        'ng-options':'value.name for value in values'        }, blank, unknown);      }      function createMultiSelect(blank, unknown) {        createSelect({ -        'ng:model':'selected', +        'ng-model':'selected',          'multiple':true, -        'ng:options':'value.name for value in values' +        'ng-options':'value.name for value in values'        }, blank, unknown);      }      it('should throw when not formated "? for ? in ?"', function() {        expect(function() { -        compile('<select ng:model="selected" ng:options="i dont parse"></select>'); -      }).toThrow("Expected ng:options in form of '_select_ (as _label_)? for (_key_,)?_value_ in" + +        compile('<select ng-model="selected" ng-options="i dont parse"></select>'); +      }).toThrow("Expected ng-options in form of '_select_ (as _label_)? for (_key_,)?_value_ in" +                   " _collection_' but got 'i dont parse'.");      }); @@ -196,8 +196,8 @@ describe('select', function() {      it('should render an object', function() {        createSelect({ -        'ng:model': 'selected', -        'ng:options': 'value as key for (key, value) in object' +        'ng-model': 'selected', +        'ng-options': 'value as key for (key, value) in object'        });        scope.$apply(function() { @@ -380,8 +380,8 @@ describe('select', function() {        it('should bind to scope value and group', function() {          createSelect({ -          'ng:model': 'selected', -          'ng:options': 'item.name group by item.group for item in values' +          'ng-model': 'selected', +          'ng-options': 'item.name group by item.group for item in values'          });          scope.$apply(function() { @@ -419,8 +419,8 @@ describe('select', function() {        it('should bind to scope value through experession', function() {          createSelect({ -          'ng:model': 'selected', -          'ng:options': 'item.id as item.name for item in values' +          'ng-model': 'selected', +          'ng-options': 'item.id as item.name for item in values'          });          scope.$apply(function() { @@ -440,8 +440,8 @@ describe('select', function() {        it('should bind to object key', function() {          createSelect({ -          'ng:model': 'selected', -          'ng:options': 'key as value for (key, value) in object' +          'ng-model': 'selected', +          'ng-options': 'key as value for (key, value) in object'          });          scope.$apply(function() { @@ -461,8 +461,8 @@ describe('select', function() {        it('should bind to object value', function() {          createSelect({ -          'ng:model': 'selected', -          'ng:options': 'value as key for (key, value) in object' +          'ng-model': 'selected', +          'ng-options': 'value as key for (key, value) in object'          });          scope.$apply(function() { @@ -592,9 +592,9 @@ describe('select', function() {        }); -      it('should support binding via ng:bind-template attribute', function () { +      it('should support binding via ng-bind-template attribute', function () {          var option; -        createSingleSelect('<option value="" ng:bind-template="blank is {{blankVal}}"></option>'); +        createSingleSelect('<option value="" ng-bind-template="blank is {{blankVal}}"></option>');          scope.$apply(function() {            scope.blankVal = 'so blank'; @@ -609,9 +609,9 @@ describe('select', function() {        }); -      it('should support biding via ng:bind attribute', function () { +      it('should support biding via ng-bind attribute', function () {          var option; -        createSingleSelect('<option value="" ng:bind="blankVal"></option>'); +        createSingleSelect('<option value="" ng-bind="blankVal"></option>');          scope.$apply(function() {            scope.blankVal = 'is blank'; @@ -664,8 +664,8 @@ describe('select', function() {        it('should update model on change through expression', function() {          createSelect({ -          'ng:model': 'selected', -          'ng:options': 'item.id as item.name for item in values' +          'ng-model': 'selected', +          'ng-options': 'item.id as item.name for item in values'          });          scope.$apply(function() { @@ -745,9 +745,9 @@ describe('select', function() {        it('should select from object', function() {          createSelect({ -          'ng:model':'selected', +          'ng-model':'selected',            'multiple':true, -          'ng:options':'key as value for (key,value) in values' +          'ng-options':'key as value for (key,value) in values'          });          scope.values = {'0':'A', '1':'B'}; @@ -766,13 +766,13 @@ describe('select', function() {      }); -    describe('ng:required', function() { +    describe('ng-required', function() { -      it('should allow bindings on ng:required', function() { +      it('should allow bindings on ng-required', function() {          createSelect({ -          'ng:model': 'value', -          'ng:options': 'item.name for item in values', -          'ng:required': '{{required}}' +          'ng-model': 'value', +          'ng-options': 'item.name for item in values', +          'ng-required': '{{required}}'          }, true); @@ -831,24 +831,24 @@ describe('select', function() {      it('should populate value attribute on OPTION', inject(function($rootScope, $compile) { -      element = $compile('<select ng:model="x"><option>abc</option></select>')($rootScope) +      element = $compile('<select ng-model="x"><option>abc</option></select>')($rootScope)        expect(element).toHaveValue('abc');      }));      it('should ignore value if already exists', inject(function($rootScope, $compile) { -      element = $compile('<select ng:model="x"><option value="abc">xyz</option></select>')($rootScope) +      element = $compile('<select ng-model="x"><option value="abc">xyz</option></select>')($rootScope)        expect(element).toHaveValue('abc');      }));      it('should set value even if newlines present', inject(function($rootScope, $compile) { -      element = $compile('<select ng:model="x"><option attr="\ntext\n" \n>\nabc\n</option></select>')($rootScope) +      element = $compile('<select ng-model="x"><option attr="\ntext\n" \n>\nabc\n</option></select>')($rootScope)        expect(element).toHaveValue('\nabc\n');      }));      it('should set value even if self closing HTML', inject(function($rootScope, $compile) {        // IE removes the \n from option, which makes this test pointless        if (msie) return; -      element = $compile('<select ng:model="x"><option>\n</option></select>')($rootScope) +      element = $compile('<select ng-model="x"><option>\n</option></select>')($rootScope)        expect(element).toHaveValue('\n');      }));    }); diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js index d085256c..0a8ab762 100644 --- a/test/scenario/dslSpec.js +++ b/test/scenario/dslSpec.js @@ -215,40 +215,40 @@ describe("angular.scenario.dsl", function() {      describe('Select', function() {        it('should select single option', function() {          doc.append( -          '<select ng:model="test">' + +          '<select ng-model="test">' +            '  <option value=A>one</option>' +            '  <option value=B selected>two</option>' +            '</select>'          );          $root.dsl.select('test').option('A'); -        expect(doc.find('[ng\\:model="test"]').val()).toEqual('A'); +        expect(doc.find('[ng-model="test"]').val()).toEqual('A');        });        it('should select option by name', function() {          doc.append( -            '<select ng:model="test">' + +            '<select ng-model="test">' +              '  <option value=A>one</option>' +              '  <option value=B selected>two</option>' +              '</select>'            );            $root.dsl.select('test').option('one'); -          expect(doc.find('[ng\\:model="test"]').val()).toEqual('A'); +          expect(doc.find('[ng-model="test"]').val()).toEqual('A');        });        it('should select multiple options', function() {          doc.append( -          '<select ng:model="test" multiple>' + +          '<select ng-model="test" multiple>' +            '  <option>A</option>' +            '  <option selected>B</option>' +            '  <option>C</option>' +            '</select>'          );          $root.dsl.select('test').options('A', 'B'); -        expect(doc.find('[ng\\:model="test"]').val()).toEqual(['A','B']); +        expect(doc.find('[ng-model="test"]').val()).toEqual(['A','B']);        });        it('should fail to select multiple options on non-multiple select', function() { -        doc.append('<select ng:model="test"></select>'); +        doc.append('<select ng-model="test"></select>');          $root.dsl.select('test').options('A', 'B');          expect($root.futureError).toMatch(/did not match/);        }); @@ -468,13 +468,13 @@ describe("angular.scenario.dsl", function() {        });        it('should select binding by name', function() { -        compile('<span ng:bind=" foo.bar "></span>'); +        compile('<span ng-bind=" foo.bar "></span>');          $root.dsl.binding('foo.bar');          expect($root.futureResult).toEqual('some value');        });        it('should select binding by regexp', function() { -        compile('<span ng:bind="foo.bar">some value</span>'); +        compile('<span ng-bind="foo.bar">some value</span>');          $root.dsl.binding(/^foo\..+/);          expect($root.futureResult).toEqual('some value');        }); @@ -486,13 +486,13 @@ describe("angular.scenario.dsl", function() {        });        it('should select binding in template by name', function() { -        compile('<pre ng:bind-template="foo {{foo.bar}} baz"></pre>', 'bar'); +        compile('<pre ng-bind-template="foo {{foo.bar}} baz"></pre>', 'bar');          $root.dsl.binding('foo.bar');          expect($root.futureResult).toEqual('bar');        });        it('should match bindings by substring match', function() { -        compile('<pre ng:bind="foo.bar | filter"></pre>', 'binding value'); +        compile('<pre ng-bind="foo.bar | filter"></pre>', 'binding value');          $root.dsl.binding('foo . bar');          expect($root.futureResult).toEqual('binding value');        }); @@ -503,7 +503,7 @@ describe("angular.scenario.dsl", function() {        });        it('should return error if no binding matches', function() { -        compile('<span ng:bind="foo">some value</span>'); +        compile('<span ng-bind="foo">some value</span>');          $root.dsl.binding('foo.bar');          expect($root.futureError).toMatch(/did not match/);        }); @@ -513,12 +513,12 @@ describe("angular.scenario.dsl", function() {        it('should prefix selector in $document.elements()', function() {          var chain;          doc.append( -          '<div id="test1"><input ng:model="test.input" value="something"></div>' + -          '<div id="test2"><input ng:model="test.input" value="something"></div>' +          '<div id="test1"><input ng-model="test.input" value="something"></div>' + +          '<div id="test2"><input ng-model="test.input" value="something"></div>'          );          chain = $root.dsl.using('div#test2');          chain.input('test.input').enter('foo'); -        var inputs = _jQuery('input[ng\\:model="test.input"]'); +        var inputs = _jQuery('input[ng-model="test.input"]');          expect(inputs.first().val()).toEqual('something');          expect(inputs.last().val()).toEqual('foo');        }); @@ -537,10 +537,10 @@ describe("angular.scenario.dsl", function() {      describe('Input', function() {        it('should change value in text input', function() { -        doc.append('<input ng:model="test.input" value="something">'); +        doc.append('<input ng-model="test.input" value="something">');          var chain = $root.dsl.input('test.input');          chain.enter('foo'); -        expect(_jQuery('input[ng\\:model="test.input"]').val()).toEqual('foo'); +        expect(_jQuery('input[ng-model="test.input"]').val()).toEqual('foo');        });        it('should change value in text input in dash form', function() { @@ -557,16 +557,16 @@ describe("angular.scenario.dsl", function() {        });        it('should toggle checkbox state', function() { -        doc.append('<input type="checkbox" ng:model="test.input" checked>'); -        expect(_jQuery('input[ng\\:model="test.input"]'). +        doc.append('<input type="checkbox" ng-model="test.input" checked>'); +        expect(_jQuery('input[ng-model="test.input"]').            prop('checked')).toBe(true);          var chain = $root.dsl.input('test.input');          chain.check(); -        expect(_jQuery('input[ng\\:model="test.input"]'). +        expect(_jQuery('input[ng-model="test.input"]').            prop('checked')).toBe(false);          $window.angular.reset();          chain.check(); -        expect(_jQuery('input[ng\\:model="test.input"]'). +        expect(_jQuery('input[ng-model="test.input"]').            prop('checked')).toBe(true);        }); @@ -603,7 +603,7 @@ describe("angular.scenario.dsl", function() {        describe('val', function() {          it('should return value in text input', function() { -          doc.append('<input ng:model="test.input" value="something">'); +          doc.append('<input ng-model="test.input" value="something">');            $root.dsl.input('test.input').val();            expect($root.futureResult).toEqual("something");          }); @@ -613,10 +613,10 @@ describe("angular.scenario.dsl", function() {      describe('Textarea', function() {        it('should change value in textarea', function() { -        doc.append('<textarea ng:model="test.textarea">something</textarea>'); +        doc.append('<textarea ng-model="test.textarea">something</textarea>');          var chain = $root.dsl.input('test.textarea');          chain.enter('foo'); -        expect(_jQuery('textarea[ng\\:model="test.textarea"]').val()).toEqual('foo'); +        expect(_jQuery('textarea[ng-model="test.textarea"]').val()).toEqual('foo');        });        it('should return error if no textarea exists', function() { diff --git a/test/scenario/e2e/Runner-compiled.html b/test/scenario/e2e/Runner-compiled.html index c3a55f4d..530fef96 100644 --- a/test/scenario/e2e/Runner-compiled.html +++ b/test/scenario/e2e/Runner-compiled.html @@ -1,7 +1,7 @@  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">    <head> -    <script type="text/javascript" src="../../../build/angular-scenario.js" ng:autotest></script> +    <script type="text/javascript" src="../../../build/angular-scenario.js" ng-autotest></script>      <script type="text/javascript" src="widgets-scenario.js"></script>    </head>    <body> diff --git a/test/scenario/e2e/Runner.html b/test/scenario/e2e/Runner.html index 387973db..1191dc86 100644 --- a/test/scenario/e2e/Runner.html +++ b/test/scenario/e2e/Runner.html @@ -1,7 +1,7 @@  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">    <head> -    <script type="text/javascript" src="../../../src/scenario/angular-bootstrap.js" ng:autotest></script> +    <script type="text/javascript" src="../../../src/scenario/angular-bootstrap.js" ng-autotest></script>      <script type="text/javascript" src="widgets-scenario.js"></script>    </head>    <body> diff --git a/test/scenario/e2e/widgets.html b/test/scenario/e2e/widgets.html index 40ba0a3a..f986144e 100644 --- a/test/scenario/e2e/widgets.html +++ b/test/scenario/e2e/widgets.html @@ -1,10 +1,10 @@  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  <html xmlns:ng="http://angularjs.org"> -  <head ng:app> +  <head ng-app>      <link rel="stylesheet" type="text/css" href="style.css"/>      <script type="text/javascript" src="../../../src/angular-bootstrap.js"></script>    </head> -  <body ng:init="$window.$scope = this"> +  <body ng-init="$window.$scope = this">      <table>        <tr>          <th width="330">Description</th> @@ -15,34 +15,34 @@        <tr>          <td>basic</td>          <td id="text-basic-box"> -          <input type="text" ng:model="text.basic"/> +          <input type="text" ng-model="text.basic"/>          </td>          <td>text.basic={{text.basic}}</td>        </tr>        <tr>          <td>password</td> -        <td><input type="password" ng:model="text.password" /></td> +        <td><input type="password" ng-model="text.password" /></td>          <td>text.password={{text.password}}</td>        </tr>        <tr>          <td>hidden</td> -        <td><input type="hidden" ng:model="text.hidden" value="hiddenValue" /></td> +        <td><input type="hidden" ng-model="text.hidden" value="hiddenValue" /></td>          <td>text.hidden={{text.hidden}}</td>        </tr>        <tr><th colspan="3">Input selection field</th></tr>        <tr id="gender-box">          <td>radio</td>          <td> -         <input type="radio" ng:model="gender" value="female"/> Female <br/> -         <input type="radio" ng:model="gender" value="male" checked="checked"/> Male +         <input type="radio" ng-model="gender" value="female"/> Female <br/> +         <input type="radio" ng-model="gender" value="male" checked="checked"/> Male          </td>          <td>gender={{gender}}</td>        </tr>        <tr>          <td>checkbox</td>          <td> -         <input type="checkbox" ng:model="checkbox.tea" checked value="on"/> Tea<br/> -         <input type="checkbox" ng:model="checkbox.coffee" value="on"/> Coffe +         <input type="checkbox" ng-model="checkbox.tea" checked value="on"/> Tea<br/> +         <input type="checkbox" ng-model="checkbox.coffee" value="on"/> Coffe          </td>          <td>            <pre>checkbox={{checkbox}}</pre> @@ -51,7 +51,7 @@        <tr>          <td>select</td>          <td> -          <select ng:model="select"> +          <select ng-model="select">              <option>A</option>              <option>B</option>              <option>C</option> @@ -62,7 +62,7 @@        <tr>          <td>multiselect</td>          <td> -          <select ng:model="multiselect" multiple> +          <select ng-model="multiselect" multiple>              <option>A</option>              <option>B</option>              <option>C</option> @@ -72,24 +72,24 @@        </tr>        <tr><th colspan="3">Buttons</th></tr>        <tr> -        <td>ng:change<br/>ng:click</td> -        <td ng:init="button.count = 0; form.count = 0;"> -          <form ng:submit="form.count = form.count + 1"> -           <input type="button" value="button" ng:change="button.count = button.count + 1"/> <br/> -           <input type="submit" value="submit input" ng:change="button.count = button.count + 1"/><br/> +        <td>ng-change<br/>ng-click</td> +        <td ng-init="button.count = 0; form.count = 0;"> +          <form ng-submit="form.count = form.count + 1"> +           <input type="button" value="button" ng-change="button.count = button.count + 1"/> <br/> +           <input type="submit" value="submit input" ng-change="button.count = button.count + 1"/><br/>             <button type="submit">submit button</button> -           <input type="image" src="" ng:change="button.count = button.count + 1"/><br/> -           <a href="" ng:click="button.count = button.count + 1">action</a> +           <input type="image" src="" ng-change="button.count = button.count + 1"/><br/> +           <a href="" ng-click="button.count = button.count + 1">action</a>            </form>          </td>          <td>button={{button}} form={{form}}</td>        </tr>        <tr><th colspan="3">Repeaters</th></tr>        <tr id="repeater-row"> -        <td>ng:repeat</td> +        <td>ng-repeat</td>          <td>            <ul> -            <li ng:repeat="name in ['misko', 'adam']">{{name}}</li> +            <li ng-repeat="name in ['misko', 'adam']">{{name}}</li>            </ul>          </td>          <td></td> diff --git a/test/service/locationSpec.js b/test/service/locationSpec.js index 97f2ab63..646a9ca0 100644 --- a/test/service/locationSpec.js +++ b/test/service/locationSpec.js @@ -771,8 +771,8 @@ describe('$location', function() {      }); -    it('should not rewrite ng:ext-link', function() { -      configureService('#new', true, true, 'ng:ext-link'); +    it('should not rewrite ng-ext-link', function() { +      configureService('#new', true, true, 'ng-ext-link');        inject(          initBrowser(),          initLocation(), diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index 1b954ea6..b0618178 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -106,7 +106,7 @@ function sortedHtml(element, showNgClass) {            continue; //IE9 creates dupes. Ignore them!          var attr = attributes[i]; -        if(attr.name.match(/^ng:/) || +        if(attr.name.match(/^ng[\:\-]/) ||              attr.value &&              attr.value !='null' &&              attr.value !='auto' && | 
