diff options
27 files changed, 326 insertions, 326 deletions
| diff --git a/src/Angular.js b/src/Angular.js index 99b6e67b..db08a47a 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -719,8 +719,8 @@ function isLeafNode (node) {   * @returns {*} The copy or updated `destination`, if `destination` was specified.   *   * @example - <doc:example> - <doc:source> + <example> + <file name="index.html">   <div ng-controller="Controller">   <form novalidate class="simple-form">   Name: <input type="text" ng-model="user.name" /><br /> @@ -751,8 +751,8 @@ function isLeafNode (node) {      $scope.reset();    }   </script> - </doc:source> - </doc:example> + </file> + </example>   */  function copy(source, destination){    if (isWindow(source) || isScope(source)) { diff --git a/src/ng/compile.js b/src/ng/compile.js index dd8d001c..31c8006e 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -383,8 +383,8 @@   * to illustrate how `$compile` works.   * </div>   * - <doc:example module="compile"> -   <doc:source> + <example module="compile"> +   <file name="index.html">      <script>        angular.module('compile', [], function($compileProvider) {          // configure new 'compile' directive by passing a directive @@ -423,8 +423,8 @@        <textarea ng-model="html"></textarea> <br>        <div compile="html"></div>      </div> -   </doc:source> -   <doc:protractor> +   </file> +   </file name="protractor.js" type="protractor">       it('should auto compile', function() {         var textarea = $('textarea');         var output = $('div[compile]'); @@ -434,8 +434,8 @@         textarea.sendKeys('{{name}}!');         expect(output.getText()).toBe('Angular!');       }); -   </doc:protractor> - </doc:example> +   </file> + </example>   *   * diff --git a/src/ng/directive/booleanAttrs.js b/src/ng/directive/booleanAttrs.js index b49105cd..e1d46bc1 100644 --- a/src/ng/directive/booleanAttrs.js +++ b/src/ng/directive/booleanAttrs.js @@ -31,8 +31,8 @@   * @example   * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes   * in links and their different behaviors: -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          <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 /> @@ -40,8 +40,8 @@          <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}}">link</a> (link, change location) -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">          it('should execute ng-click but not reload when href without value', function() {            element(by.id('link-1')).click();            expect(element(by.model('value')).getAttribute('value')).toEqual('1'); @@ -89,8 +89,8 @@            element(by.id('link-6')).click();            expect(browser.getCurrentUrl()).toMatch(/\/6$/);          }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   */  /** @@ -169,19 +169,19 @@   * a permanent reliable place to store the binding information.   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          Click me to toggle: <input type="checkbox" ng-model="checked"><br/>          <button ng-model="button" ng-disabled="checked">Button</button> -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">          it('should toggle button', function() {            expect(element(by.css('.doc-example-live button')).getAttribute('disabled')).toBeFalsy();            element(by.model('checked')).click();            expect(element(by.css('.doc-example-live button')).getAttribute('disabled')).toBeTruthy();          }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   *   * @element INPUT   * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,  @@ -204,19 +204,19 @@   * This complementary directive is not removed by the browser and so provides   * a permanent reliable place to store the binding information.   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          Check me to check both: <input type="checkbox" ng-model="master"><br/>          <input id="checkSlave" type="checkbox" ng-checked="master"> -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">          it('should check both checkBoxes', function() {            expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();            element(by.model('master')).click();            expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();          }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   *   * @element INPUT   * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,  @@ -239,19 +239,19 @@   * This complementary directive is not removed by the browser and so provides   * a permanent reliable place to store the binding information.   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          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:protractor> +      </file> +      </file name="protractor.js" type="protractor">          it('should toggle readonly attr', function() {            expect(element(by.css('.doc-example-live [type="text"]')).getAttribute('readonly')).toBeFalsy();            element(by.model('checked')).click();            expect(element(by.css('.doc-example-live [type="text"]')).getAttribute('readonly')).toBeTruthy();          }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   *   * @element INPUT   * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,  @@ -275,22 +275,22 @@   * a permanent reliable place to store the binding information.   *    * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          Check me to select: <input type="checkbox" ng-model="selected"><br/>          <select>            <option>Hello!</option>            <option id="greet" ng-selected="selected">Greetings!</option>          </select> -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">          it('should select Greetings!', function() {            expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();            element(by.model('selected')).click();            expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();          }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   *   * @element OPTION   * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,  @@ -312,21 +312,21 @@   * This complementary directive is not removed by the browser and so provides   * a permanent reliable place to store the binding information.   * @example -     <doc:example> -       <doc:source> +     <example> +       <file name="index.html">           Check me check multiple: <input type="checkbox" ng-model="open"><br/>           <details id="details" ng-open="open">              <summary>Show/Hide me</summary>           </details> -       </doc:source> -       <doc:protractor> +       </file> +       </file name="protractor.js" type="protractor">           it('should toggle open', function() {             expect(element(by.id('details')).getAttribute('open')).toBeFalsy();             element(by.model('open')).click();             expect(element(by.id('details')).getAttribute('open')).toBeTruthy();           }); -       </doc:protractor> -     </doc:example> +       </file> +     </example>   *   * @element DETAILS   * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,  diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js index 31034730..963ef04d 100644 --- a/src/ng/directive/form.js +++ b/src/ng/directive/form.js @@ -283,8 +283,8 @@ function FormController(element, attrs) {   *                       related scope, under this name.   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">         <script>           function Ctrl($scope) {             $scope.userType = 'guest'; @@ -299,8 +299,8 @@ function FormController(element, attrs) {           <tt>myForm.$valid = {{myForm.$valid}}</tt><br>           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>          </form> -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">          it('should initialize to model', function() {            var userType = element(by.binding('userType'));            var valid = element(by.binding('myForm.input.$valid')); @@ -320,8 +320,8 @@ function FormController(element, attrs) {            expect(userType.getText()).toEqual('userType =');            expect(valid.getText()).toContain('false');          }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   */  var formDirectiveFactory = function(isNgForm) {    return ['$timeout', function($timeout) { diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 1a357805..92c7d2c5 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -39,8 +39,8 @@ var inputType = {     * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.     *     * @example -      <doc:example> -        <doc:source> +      <example> +        <file name="index.html">           <script>             function Ctrl($scope) {               $scope.text = 'guest'; @@ -61,8 +61,8 @@ var inputType = {             <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>             <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>            </form> -        </doc:source> -        <doc:protractor> +        </file> +        </file name="protractor.js" type="protractor">            var text = element(by.binding('text'));            var valid = element(by.binding('myForm.input.$valid'));            var input = element(by.model('text')); @@ -86,8 +86,8 @@ var inputType = {              expect(valid.getText()).toContain('false');            }); -        </doc:protractor> -      </doc:example> +        </file> +      </example>     */    'text': textInputType, @@ -119,8 +119,8 @@ var inputType = {     *    interaction with the input element.     *     * @example -      <doc:example> -        <doc:source> +      <example> +        <file name="index.html">           <script>             function Ctrl($scope) {               $scope.value = 12; @@ -139,8 +139,8 @@ var inputType = {             <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>             <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>            </form> -        </doc:source> -        <doc:protractor> +        </file> +        </file name="protractor.js" type="protractor">            var value = element(by.binding('value'));            var valid = element(by.binding('myForm.input.$valid'));            var input = element(by.model('value')); @@ -163,8 +163,8 @@ var inputType = {              expect(value.getText()).toEqual('value =');              expect(valid.getText()).toContain('false');            }); -        </doc:protractor> -      </doc:example> +        </file> +      </example>     */    'number': numberInputType, @@ -194,8 +194,8 @@ var inputType = {     *    interaction with the input element.     *     * @example -      <doc:example> -        <doc:source> +      <example> +        <file name="index.html">           <script>             function Ctrl($scope) {               $scope.text = 'http://google.com'; @@ -214,8 +214,8 @@ var inputType = {             <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>             <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>            </form> -        </doc:source> -        <doc:protractor> +        </file> +        </file name="protractor.js" type="protractor">            var text = element(by.binding('text'));            var valid = element(by.binding('myForm.input.$valid'));            var input = element(by.model('text')); @@ -239,8 +239,8 @@ var inputType = {              expect(valid.getText()).toContain('false');            }); -        </doc:protractor> -      </doc:example> +        </file> +      </example>     */    'url': urlInputType, @@ -270,8 +270,8 @@ var inputType = {     *    interaction with the input element.     *     * @example -      <doc:example> -        <doc:source> +      <example> +        <file name="index.html">           <script>             function Ctrl($scope) {               $scope.text = 'me@example.com'; @@ -290,8 +290,8 @@ var inputType = {               <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>               <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>             </form> -        </doc:source> -        <doc:protractor> +        </file> +        </file name="protractor.js" type="protractor">            var text = element(by.binding('text'));            var valid = element(by.binding('myForm.input.$valid'));            var input = element(by.model('text')); @@ -314,8 +314,8 @@ var inputType = {              expect(valid.getText()).toContain('false');            }); -        </doc:protractor> -      </doc:example> +        </file> +      </example>     */    'email': emailInputType, @@ -336,8 +336,8 @@ var inputType = {     *    be set when selected.     *     * @example -      <doc:example> -        <doc:source> +      <example> +        <file name="index.html">           <script>             function Ctrl($scope) {               $scope.color = 'blue'; @@ -354,8 +354,8 @@ var inputType = {             <tt>color = {{color | json}}</tt><br/>            </form>            Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. -        </doc:source> -        <doc:protractor> +        </file> +        </file name="protractor.js" type="protractor">            it('should change state', function() {              var color = element(by.binding('color')); @@ -365,8 +365,8 @@ var inputType = {              expect(color.getText()).toContain('red');            }); -        </doc:protractor> -      </doc:example> +        </file> +      </example>     */    'radio': radioInputType, @@ -386,8 +386,8 @@ var inputType = {     *    interaction with the input element.     *     * @example -      <doc:example> -        <doc:source> +      <example> +        <file name="index.html">           <script>             function Ctrl($scope) {               $scope.value1 = true; @@ -401,8 +401,8 @@ var inputType = {             <tt>value1 = {{value1}}</tt><br/>             <tt>value2 = {{value2}}</tt><br/>            </form> -        </doc:source> -        <doc:protractor> +        </file> +        </file name="protractor.js" type="protractor">            it('should change state', function() {              var value1 = element(by.binding('value1'));              var value2 = element(by.binding('value2')); @@ -416,8 +416,8 @@ var inputType = {              expect(value1.getText()).toContain('false');              expect(value2.getText()).toContain('NO');            }); -        </doc:protractor> -      </doc:example> +        </file> +      </example>     */    'checkbox': checkboxInputType, @@ -740,8 +740,8 @@ function checkboxInputType(scope, element, attr, ctrl) {   *    interaction with the input element.   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">         <script>           function Ctrl($scope) {             $scope.user = {name: 'guest', last: 'visitor'}; @@ -770,8 +770,8 @@ function checkboxInputType(scope, element, attr, ctrl) {           <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br>           <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br>         </div> -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">          var user = element(by.binding('{{user}}'));          var userNameValid = element(by.binding('myForm.userName.$valid'));          var lastNameValid = element(by.binding('myForm.lastName.$valid')); @@ -823,8 +823,8 @@ function checkboxInputType(scope, element, attr, ctrl) {            expect(lastNameError.getText()).toContain('maxlength');            expect(formValid.getText()).toContain('false');          }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   */  var inputDirective = ['$browser', '$sniffer', function($browser, $sniffer) {    return { @@ -1262,8 +1262,8 @@ var ngModelDirective = function() {   * in input value.   *   * @example - * <doc:example> - *   <doc:source> + * <example> + *   <file name="index.html">   *     <script>   *       function Controller($scope) {   *         $scope.counter = 0; @@ -1279,8 +1279,8 @@ var ngModelDirective = function() {   *       <tt>debug = {{confirmed}}</tt><br/>   *       <tt>counter = {{counter}}</tt><br/>   *     </div> - *   </doc:source> - *   <doc:protractor> + *   </file> + *   </file name="protractor.js" type="protractor">   *     var counter = element(by.binding('counter'));   *     var debug = element(by.binding('confirmed'));   * @@ -1299,8 +1299,8 @@ var ngModelDirective = function() {   *       expect(counter.getText()).toContain('0');   *       expect(debug.getText()).toContain('true');   *     }); - *   </doc:protractor> - * </doc:example> + *   </file> + * </example>   */  var ngChangeDirective = valueFn({    require: 'ngModel', @@ -1353,8 +1353,8 @@ var requiredDirective = function() {   *   specified in form `/something/` then the value will be converted into a regular expression.   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">         <script>           function Ctrl($scope) {             $scope.names = ['igor', 'misko', 'vojta']; @@ -1371,8 +1371,8 @@ var requiredDirective = function() {           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>          </form> -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">          var listInput = element(by.model('names'));          var names = element(by.binding('{{names}}'));          var valid = element(by.binding('myForm.namesInput.$valid')); @@ -1391,8 +1391,8 @@ var requiredDirective = function() {            expect(names.getText()).toContain('');            expect(valid.getText()).toContain('false');            expect(error.getCssValue('display')).not.toBe('none');        }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   */  var ngListDirective = function() {    return { @@ -1452,8 +1452,8 @@ var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;   *   of the `input` element   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">         <script>            function Ctrl($scope) {              $scope.names = ['pizza', 'unicorns', 'robots']; @@ -1472,8 +1472,8 @@ var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;              </label>            <div>You chose {{my.favorite}}</div>          </form> -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">          var favorite = element(by.binding('my.favorite'));          it('should initialize to model', function() { @@ -1483,8 +1483,8 @@ var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;            element.all(by.model('my.favorite')).get(0).click();            expect(favorite.getText()).toContain('pizza');          }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   */  var ngValueDirective = function() {    return { diff --git a/src/ng/directive/ngBind.js b/src/ng/directive/ngBind.js index 82bbfab2..8e787a64 100644 --- a/src/ng/directive/ngBind.js +++ b/src/ng/directive/ngBind.js @@ -26,8 +26,8 @@   *   * @example   * Enter a name in the Live Preview text box; the greeting below the text box changes instantly. -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <script>           function Ctrl($scope) {             $scope.name = 'Whirled'; @@ -37,8 +37,8 @@           Enter name: <input type="text" ng-model="name"><br>           Hello <span ng-bind="name"></span>!         </div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should check ng-bind', function() {           var exampleContainer = $('.doc-example-live');           var nameInput = element(by.model('name')); @@ -48,8 +48,8 @@           nameInput.sendKeys('world');           expect(exampleContainer.findElement(by.binding('name')).getText()).toBe('world');         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  var ngBindDirective = ngDirective(function(scope, element, attr) {    element.addClass('ng-binding').data('$binding', attr.ngBind); @@ -80,8 +80,8 @@ var ngBindDirective = ngDirective(function(scope, element, attr) {   *   * @example   * Try it here: enter text in text box and watch the greeting change. -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <script>           function Ctrl($scope) {             $scope.salutation = 'Hello'; @@ -93,8 +93,8 @@ var ngBindDirective = ngDirective(function(scope, element, attr) {          Name: <input type="text" ng-model="name"><br>          <pre ng-bind-template="{{salutation}} {{name}}!"></pre>         </div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should check ng-bind', function() {           var salutationElem = element(by.binding('salutation'));           var salutationInput = element(by.model('salutation')); @@ -109,8 +109,8 @@ var ngBindDirective = ngDirective(function(scope, element, attr) {           expect(salutationElem.getText()).toBe('Greetings user!');         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  var ngBindTemplateDirective = ['$interpolate', function($interpolate) {    return function(scope, element, attr) { diff --git a/src/ng/directive/ngCloak.js b/src/ng/directive/ngCloak.js index 42b0224f..4b63dfd1 100644 --- a/src/ng/directive/ngCloak.js +++ b/src/ng/directive/ngCloak.js @@ -40,20 +40,20 @@   * @element ANY   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">          <div id="template1" ng-cloak>{{ 'hello' }}</div>          <div id="template2" ng-cloak class="ng-cloak">{{ 'hello IE7' }}</div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should remove the template directive and css class', function() {           expect($('.doc-example-live #template1').getAttribute('ng-cloak')).             toBeNull();           expect($('.doc-example-live #template2').getAttribute('ng-cloak')).             toBeNull();         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   *   */  var ngCloakDirective = ngDirective({ diff --git a/src/ng/directive/ngController.js b/src/ng/directive/ngController.js index 6d294cc9..29cbc3fc 100644 --- a/src/ng/directive/ngController.js +++ b/src/ng/directive/ngController.js @@ -36,8 +36,8 @@   * notice that any changes to the data are automatically reflected in the View without the need   * for a manual update. The example is shown in two different declaration styles you may use   * according to preference. -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <script>          function SettingsController1() {            this.name = "John Smith"; @@ -81,8 +81,8 @@            <li>[ <a href="" ng-click="settings.addContact()">add</a> ]</li>         </ul>        </div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should check controller as', function() {           var container = element(by.id('ctrl-as-exmpl')); @@ -111,10 +111,10 @@               .getAttribute('value'))               .toBe('yourname@example.org');         }); -     </doc:protractor> -   </doc:example> -    <doc:example> -     <doc:source> +     </file> +   </example> +    <example> +     <file name="index.html">        <script>          function SettingsController2($scope) {            $scope.name = "John Smith"; @@ -158,8 +158,8 @@            <li>[ <a href="" ng-click="addContact()">add</a> ]</li>         </ul>        </div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should check controller', function() {           var container = element(by.id('ctrl-exmpl')); @@ -188,8 +188,8 @@               .getAttribute('value'))               .toBe('yourname@example.org');         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  var ngControllerDirective = [function() { diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js index 156acce1..17d32f80 100644 --- a/src/ng/directive/ngEventDirs.js +++ b/src/ng/directive/ngEventDirs.js @@ -14,21 +14,21 @@   * click. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <button ng-click="count = count + 1" ng-init="count=0">          Increment        </button>        count: {{count}} -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should check ng-click', function() {           expect(element(by.binding('count')).getText()).toMatch('0');           element(by.css('.doc-example-live button')).click();           expect(element(by.binding('count')).getText()).toMatch('1');         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  /*   * A directive that allows creation of custom onclick handlers that are defined as angular @@ -71,14 +71,14 @@ forEach(   * a dblclick. (The Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <button ng-dblclick="count = count + 1" ng-init="count=0">          Increment (on double click)        </button>        count: {{count}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */ @@ -95,14 +95,14 @@ forEach(   * mousedown. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <button ng-mousedown="count = count + 1" ng-init="count=0">          Increment (on mouse down)        </button>        count: {{count}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */ @@ -119,14 +119,14 @@ forEach(   * mouseup. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <button ng-mouseup="count = count + 1" ng-init="count=0">          Increment (on mouse up)        </button>        count: {{count}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */  /** @@ -142,14 +142,14 @@ forEach(   * mouseover. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <button ng-mouseover="count = count + 1" ng-init="count=0">          Increment (when mouse is over)        </button>        count: {{count}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */ @@ -166,14 +166,14 @@ forEach(   * mouseenter. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <button ng-mouseenter="count = count + 1" ng-init="count=0">          Increment (when mouse enters)        </button>        count: {{count}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */ @@ -190,14 +190,14 @@ forEach(   * mouseleave. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <button ng-mouseleave="count = count + 1" ng-init="count=0">          Increment (when mouse leaves)        </button>        count: {{count}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */ @@ -214,14 +214,14 @@ forEach(   * mousemove. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <button ng-mousemove="count = count + 1" ng-init="count=0">          Increment (when mouse moves)        </button>        count: {{count}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */ @@ -238,12 +238,12 @@ forEach(   * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <input ng-keydown="count = count + 1" ng-init="count=0">        key down count: {{count}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */ @@ -260,12 +260,12 @@ forEach(   * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <input ng-keyup="count = count + 1" ng-init="count=0">        key up count: {{count}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */ @@ -281,12 +281,12 @@ forEach(   * keypress. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <input ng-keypress="count = count + 1" ng-init="count=0">        key press count: {{count}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */ @@ -306,8 +306,8 @@ forEach(   * @param {expression} ngSubmit {@link guide/expression Expression} to eval. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <script>          function Ctrl($scope) {            $scope.list = []; @@ -326,8 +326,8 @@ forEach(          <input type="submit" id="submit" value="Submit" />          <pre>list={{list}}</pre>        </form> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should check ng-submit', function() {           expect(element(by.binding('list')).getText()).toBe('list=[]');           element(by.css('.doc-example-live #submit')).click(); @@ -340,8 +340,8 @@ forEach(           element(by.css('.doc-example-live #submit')).click();           expect(element(by.binding('list')).getText()).toContain('hello');          }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  /** @@ -389,12 +389,12 @@ forEach(   * copy. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <input ng-copy="copied=true" ng-init="copied=false; value='copy me'" ng-model="value">        copied: {{copied}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */  /** @@ -410,12 +410,12 @@ forEach(   * cut. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <input ng-cut="cut=true" ng-init="cut=false; value='cut me'" ng-model="value">        cut: {{cut}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */  /** @@ -431,10 +431,10 @@ forEach(   * paste. (Event object is available as `$event`)   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">        <input ng-paste="paste=true" ng-init="paste=false" placeholder='paste here'>        pasted: {{paste}} -     </doc:source> -   </doc:example> +     </file> +   </example>   */ diff --git a/src/ng/directive/ngInit.js b/src/ng/directive/ngInit.js index 8dd05c9b..05ded684 100644 --- a/src/ng/directive/ngInit.js +++ b/src/ng/directive/ngInit.js @@ -29,8 +29,8 @@   * @param {expression} ngInit {@link guide/expression Expression} to eval.   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">     <script>       function Ctrl($scope) {         $scope.list = [['a', 'b'], ['c', 'd']]; @@ -43,8 +43,8 @@         </div>       </div>     </div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should alias index positions', function() {           var elements = element.all(by.css('.example-init'));           expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;'); @@ -52,8 +52,8 @@           expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');           expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  var ngInitDirective = ngDirective({    priority: 450, diff --git a/src/ng/directive/ngNonBindable.js b/src/ng/directive/ngNonBindable.js index cf98f531..3690f2df 100644 --- a/src/ng/directive/ngNonBindable.js +++ b/src/ng/directive/ngNonBindable.js @@ -19,17 +19,17 @@   * but the one wrapped in `ngNonBindable` is left alone.   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          <div>Normal: {{1 + 2}}</div>          <div ng-non-bindable>Ignored: {{1 + 2}}</div> -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">         it('should check ng-non-bindable', function() {           expect(element(by.binding('1 + 2')).getText()).toContain('3');           expect(element.all(by.css('.doc-example-live div')).last().getText()).toMatch(/1 \+ 2/);         }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   */  var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 }); diff --git a/src/ng/directive/ngPluralize.js b/src/ng/directive/ngPluralize.js index d6ad861f..a322b3b9 100644 --- a/src/ng/directive/ngPluralize.js +++ b/src/ng/directive/ngPluralize.js @@ -90,8 +90,8 @@   * @param {number=} offset Offset to deduct from the total number.   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          <script>            function Ctrl($scope) {              $scope.person1 = 'Igor'; @@ -122,8 +122,8 @@                                 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">            </ng-pluralize>          </div> -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">          it('should show correct pluralized string', function() {            var withoutOffset = element.all(by.css('ng-pluralize')).get(0);            var withOffset = element.all(by.css('ng-pluralize')).get(1); @@ -169,8 +169,8 @@            person2.sendKeys('Vojta');            expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');          }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   */  var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) {    var BRACE = /{}/g; diff --git a/src/ng/directive/ngTransclude.js b/src/ng/directive/ngTransclude.js index 95606b65..e9b31bfb 100644 --- a/src/ng/directive/ngTransclude.js +++ b/src/ng/directive/ngTransclude.js @@ -13,8 +13,8 @@   * @element ANY   *   * @example -   <doc:example module="transclude"> -     <doc:source> +   <example module="transclude"> +     <file name="index.html">         <script>           function Ctrl($scope) {             $scope.title = 'Lorem Ipsum'; @@ -39,8 +39,8 @@           <textarea ng-model="text"></textarea> <br/>           <pane title="{{title}}">{{text}}</pane>         </div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">          it('should have transcluded', function() {            var titleElement = element(by.model('title'));            titleElement.clear(); @@ -51,8 +51,8 @@            expect(element(by.binding('title')).getText()).toEqual('TITLE');            expect(element(by.binding('text')).getText()).toEqual('TEXT');          }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   *   */  var ngTranscludeDirective = ngDirective({ diff --git a/src/ng/directive/script.js b/src/ng/directive/script.js index 229f3542..84550568 100644 --- a/src/ng/directive/script.js +++ b/src/ng/directive/script.js @@ -16,22 +16,22 @@   * @param {string} id Cache name of the template.   *   * @example -  <doc:example> -    <doc:source> +  <example> +    <file name="index.html">        <script type="text/ng-template" id="/tpl.html">          Content of the template.        </script>        <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:protractor> +    </file> +    </file name="protractor.js" type="protractor">        it('should load template defined inside script tag', function() {          element(by.css('#tpl-link')).click();          expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);        }); -    </doc:protractor> -  </doc:example> +    </file> +  </example>   */  var scriptDirective = ['$templateCache', function($templateCache) {    return { diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js index 0b01e612..faa9c7a7 100644 --- a/src/ng/directive/select.js +++ b/src/ng/directive/select.js @@ -72,8 +72,8 @@ var ngOptionsMinErr = minErr('ngOptions');   *     `value` variable (e.g. `value.propertyName`).   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          <script>          function MyCntrl($scope) {            $scope.colors = [ @@ -119,8 +119,8 @@ var ngOptionsMinErr = minErr('ngOptions');                 ng-style="{'background-color':color.name}">            </div>          </div> -      </doc:source> -      <doc:protractor> +      </file> +      </file name="protractor.js" type="protractor">           it('should check ng-options', function() {             expect(element(by.binding('{selected_color:color}')).getText()).toMatch('red');             element.all(by.select('color')).first().click(); @@ -130,8 +130,8 @@ var ngOptionsMinErr = minErr('ngOptions');             element.all(by.css('.nullable select[ng-model="color"] option')).first().click();             expect(element(by.binding('{selected_color:color}')).getText()).toMatch('null');           }); -      </doc:protractor> -    </doc:example> +      </file> +    </example>   */  var ngOptionsDirective = valueFn({ terminal: true }); diff --git a/src/ng/filter/filter.js b/src/ng/filter/filter.js index a7ac1d0a..0e64c5b1 100644 --- a/src/ng/filter/filter.js +++ b/src/ng/filter/filter.js @@ -46,8 +46,8 @@   *       insensitive way.   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <div ng-init="friends = [{name:'John', phone:'555-1276'},                                  {name:'Mary', phone:'800-BIG-MARY'},                                  {name:'Mike', phone:'555-4321'}, @@ -75,8 +75,8 @@             <td>{{friendObj.phone}}</td>           </tr>         </table> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         var expectFriendNames = function(expectedNames, key) {           element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {             arr.forEach(function(wd, i) { @@ -110,8 +110,8 @@           strict.click();           expectFriendNames(['Julie'], 'friendObj');         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  function filterFilter() {    return function(array, expression, comparator) { diff --git a/src/ng/filter/filters.js b/src/ng/filter/filters.js index 85bf120f..8f10acf7 100644 --- a/src/ng/filter/filters.js +++ b/src/ng/filter/filters.js @@ -15,8 +15,8 @@   *   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <script>           function Ctrl($scope) {             $scope.amount = 1234.56; @@ -27,8 +27,8 @@           default currency symbol ($): <span id="currency-default">{{amount | currency}}</span><br>           custom currency identifier (USD$): <span>{{amount | currency:"USD$"}}</span>         </div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should init with 1234.56', function() {           expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');           expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('USD$1,234.56'); @@ -44,8 +44,8 @@           expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');           expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('(USD$1,234.00)');         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  currencyFilter.$inject = ['$locale'];  function currencyFilter($locale) { @@ -74,8 +74,8 @@ function currencyFilter($locale) {   * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <script>           function Ctrl($scope) {             $scope.val = 1234.56789; @@ -87,8 +87,8 @@ function currencyFilter($locale) {           No fractions: <span>{{val | number:0}}</span><br>           Negative number: <span>{{-val | number:4}}</span>         </div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should format numbers', function() {           expect(element(by.id('number-default')).getText()).toBe('1,234.568');           expect(element(by.binding('val | number:0')).getText()).toBe('1,235'); @@ -102,8 +102,8 @@ function currencyFilter($locale) {           expect(element(by.binding('val | number:0')).getText()).toBe('3,374');           expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');        }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */ @@ -329,16 +329,16 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+   * @returns {string} Formatted string or the input if input is not recognized as date/millis.   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:             <span>{{1288323623006 | date:'medium'}}</span><br>         <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:            <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>         <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:            <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should format date', function() {           expect(element(by.binding("1288323623006 | date:'medium'")).getText()).              toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/); @@ -347,8 +347,8 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+           expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()).              toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/);         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  dateFilter.$inject = ['$locale'];  function dateFilter($locale) { @@ -442,16 +442,16 @@ function dateFilter($locale) {   *   *   * @example: -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <pre>{{ {'name':'value'} | json }}</pre> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should jsonify filtered objects', function() {           expect(element(by.binding("{'name':'value'}")).getText()).toMatch(/\{\n  "name": ?"value"\n}/);         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   *   */  function jsonFilter() { diff --git a/src/ng/filter/limitTo.js b/src/ng/filter/limitTo.js index 264cba1c..b4320950 100644 --- a/src/ng/filter/limitTo.js +++ b/src/ng/filter/limitTo.js @@ -19,8 +19,8 @@   *     had less than `limit` elements.   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <script>           function Ctrl($scope) {             $scope.numbers = [1,2,3,4,5,6,7,8,9]; @@ -35,8 +35,8 @@           Limit {{letters}} to: <input type="integer" ng-model="letterLimit">           <p>Output letters: {{ letters | limitTo:letterLimit }}</p>         </div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         var numLimitInput = element(by.model('numLimit'));         var letterLimitInput = element(by.model('letterLimit'));         var limitedNumbers = element(by.binding('numbers | limitTo:numLimit')); @@ -66,8 +66,8 @@           expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');           expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  function limitToFilter(){    return function(input, limit) { diff --git a/src/ng/filter/orderBy.js b/src/ng/filter/orderBy.js index 3e06ac95..b6262698 100644 --- a/src/ng/filter/orderBy.js +++ b/src/ng/filter/orderBy.js @@ -26,8 +26,8 @@   * @returns {Array} Sorted copy of the source array.   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <script>           function Ctrl($scope) {             $scope.friends = @@ -57,8 +57,8 @@             </tr>           </table>         </div> -     </doc:source> -   </doc:example> +     </file> +   </example>   */  orderByFilter.$inject = ['$parse'];  function orderByFilter($parse){ diff --git a/src/ng/interpolate.js b/src/ng/interpolate.js index abc54b43..9b541fec 100644 --- a/src/ng/interpolate.js +++ b/src/ng/interpolate.js @@ -12,8 +12,8 @@ var $interpolateMinErr = minErr('$interpolate');   * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.   *   * @example -<doc:example module="customInterpolationApp"> -<doc:source> +<example module="customInterpolationApp"> +<file name="index.html">  <script>    var customInterpolationApp = angular.module('customInterpolationApp', []); @@ -30,13 +30,13 @@ var $interpolateMinErr = minErr('$interpolate');  <div ng-app="App" ng-controller="DemoController as demo">      //demo.label//  </div> -</doc:source> -<doc:protractor> +</file> +</file name="protractor.js" type="protractor">    it('should interpolate binding with custom symbols', function() {      expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');    }); -</doc:protractor> -</doc:example> +</file> +</example>   */  function $InterpolateProvider() {    var startSymbol = '{{'; diff --git a/src/ng/interval.js b/src/ng/interval.js index d528ebe1..c5e3aede 100644 --- a/src/ng/interval.js +++ b/src/ng/interval.js @@ -42,8 +42,8 @@ function $IntervalProvider() {        * @returns {promise} A promise which will be notified on each iteration.        *        * @example -      <doc:example module="time"> -        <doc:source> +      <example module="time"> +        <file name="index.html">            <script>              function Ctrl2($scope,$interval) {                $scope.format = 'M/d/yy h:mm:ss a'; @@ -127,8 +127,8 @@ function $IntervalProvider() {              </div>            </div> -        </doc:source> -      </doc:example> +        </file> +      </example>        */      function interval(fn, delay, count, invokeApply) {        var setInterval = $window.setInterval, diff --git a/src/ng/window.js b/src/ng/window.js index 94f8b884..e1928a88 100644 --- a/src/ng/window.js +++ b/src/ng/window.js @@ -16,8 +16,8 @@   * expression.   *   * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <script>           function Ctrl($scope, $window) {             $scope.greeting = 'Hello, World!'; @@ -30,15 +30,15 @@           <input type="text" ng-model="greeting" />           <button ng-click="doGreeting(greeting)">ALERT</button>         </div> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">        it('should display the greeting in the input box', function() {         element(by.model('greeting')).sendKeys('Hello, E2E Tests');         // If we click the button it will block the test runner         // element(':button').click();        }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  function $WindowProvider(){    this.$get = valueFn(window); diff --git a/src/ngCookies/cookies.js b/src/ngCookies/cookies.js index ffa124c0..ec2f4a90 100644 --- a/src/ngCookies/cookies.js +++ b/src/ngCookies/cookies.js @@ -33,8 +33,8 @@ angular.module('ngCookies', ['ng']).     * Requires the {@link ngCookies `ngCookies`} module to be installed.     *     * @example -   <doc:example> -     <doc:source> +   <example> +     <file name="index.html">         <script>           function ExampleController($cookies) {             // Retrieving a cookie @@ -43,8 +43,8 @@ angular.module('ngCookies', ['ng']).             $cookies.myFavorite = 'oatmeal';           }         </script> -     </doc:source> -   </doc:example> +     </file> +   </example>     */     factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {        var cookies = {}, diff --git a/src/ngSanitize/filter/linky.js b/src/ngSanitize/filter/linky.js index 43019f33..666cd9d5 100644 --- a/src/ngSanitize/filter/linky.js +++ b/src/ngSanitize/filter/linky.js @@ -21,8 +21,8 @@     <span ng-bind-html="linky_expression | linky"></span>   *   * @example -   <doc:example module="ngSanitize"> -     <doc:source> +   <example module="ngSanitize"> +     <file name="index.html">         <script>           function Ctrl($scope) {             $scope.snippet = @@ -66,8 +66,8 @@             <td><div ng-bind="snippet"></div></td>           </tr>         </table> -     </doc:source> -     <doc:protractor> +     </file> +     </file name="protractor.js" type="protractor">         it('should linkify the snippet with urls', function() {           expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).               toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + @@ -98,8 +98,8 @@              toBe('http://angularjs.org/');          expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');         }); -     </doc:protractor> -   </doc:example> +     </file> +   </example>   */  angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {    var LINKY_URL_REGEXP = diff --git a/src/ngSanitize/sanitize.js b/src/ngSanitize/sanitize.js index 6b1e99ea..c67ee976 100644 --- a/src/ngSanitize/sanitize.js +++ b/src/ngSanitize/sanitize.js @@ -53,8 +53,8 @@ var $sanitizeMinErr = angular.$$minErr('$sanitize');   * @returns {string} Sanitized html.   *   * @example -   <doc:example module="ngSanitize"> -   <doc:source> +   <example module="ngSanitize"> +   <file name="index.html">       <script>         function Ctrl($scope, $sce) {           $scope.snippet = @@ -98,8 +98,8 @@ var $sanitizeMinErr = angular.$$minErr('$sanitize');           </tr>         </table>         </div> -   </doc:source> -   <doc:protractor> +   </file> +   </file name="protractor.js" type="protractor">       it('should sanitize the html snippet by default', function() {         expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).           toBe('<p>an html\n<em>click here</em>\nsnippet</p>'); @@ -129,8 +129,8 @@ var $sanitizeMinErr = angular.$$minErr('$sanitize');         expect(element(by.css('#bind-default div')).getInnerHtml()).toBe(           "new <b onclick=\"alert(1)\">text</b>");       }); -   </doc:protractor> -   </doc:example> +   </file> +   </example>   */  function $SanitizeProvider() {    this.$get = ['$$sanitizeUri', function($$sanitizeUri) { diff --git a/src/ngTouch/directive/ngClick.js b/src/ngTouch/directive/ngClick.js index c2eaac5c..6cd0ff76 100644 --- a/src/ngTouch/directive/ngClick.js +++ b/src/ngTouch/directive/ngClick.js @@ -25,14 +25,14 @@   * upon tap. (Event object is available as `$event`)   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          <button ng-click="count = count + 1" ng-init="count=0">            Increment          </button>          count: {{ count }} -      </doc:source> -    </doc:example> +      </file> +    </example>   */  ngTouch.config(['$provide', function($provide) { diff --git a/src/ngTouch/directive/ngSwipe.js b/src/ngTouch/directive/ngSwipe.js index 7f60d228..f1988329 100644 --- a/src/ngTouch/directive/ngSwipe.js +++ b/src/ngTouch/directive/ngSwipe.js @@ -19,8 +19,8 @@   * upon left swipe. (Event object is available as `$event`)   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          <div ng-show="!showActions" ng-swipe-left="showActions = true">            Some list content, like an email in the inbox          </div> @@ -28,8 +28,8 @@            <button ng-click="reply()">Reply</button>            <button ng-click="delete()">Delete</button>          </div> -      </doc:source> -    </doc:example> +      </file> +    </example>   */  /** @@ -49,8 +49,8 @@   * upon right swipe. (Event object is available as `$event`)   *   * @example -    <doc:example> -      <doc:source> +    <example> +      <file name="index.html">          <div ng-show="!showActions" ng-swipe-left="showActions = true">            Some list content, like an email in the inbox          </div> @@ -58,8 +58,8 @@            <button ng-click="reply()">Reply</button>            <button ng-click="delete()">Delete</button>          </div> -      </doc:source> -    </doc:example> +      </file> +    </example>   */  function makeSwipeDirective(directiveName, direction, eventName) { | 
