diff options
| author | Misko Hevery | 2011-02-16 12:00:06 -0500 | 
|---|---|---|
| committer | Misko Hevery | 2011-02-18 14:22:51 -0800 | 
| commit | 87cbf9f59180d015da78c4286d692afafece5036 (patch) | |
| tree | 5747541809db36c56b56c331a721f99b84c3b669 /src/directives.js | |
| parent | fd6e5e3f31f374de7be7c80acaa766a14cb753db (diff) | |
| download | angular.js-87cbf9f59180d015da78c4286d692afafece5036.tar.bz2 | |
Remove ng:watch
Closes#143
Diffstat (limited to 'src/directives.js')
| -rw-r--r-- | src/directives.js | 45 | 
1 files changed, 0 insertions, 45 deletions
| diff --git a/src/directives.js b/src/directives.js index 53601a4f..5e611571 100644 --- a/src/directives.js +++ b/src/directives.js @@ -516,51 +516,6 @@ angularDirective("ng:submit", function(expression, element) {  }); -/** - * @workInProgress - * @ngdoc directive - * @name angular.directive.ng:watch - * - * @description - * The `ng:watch` allows you watch a variable and then execute - * an evaluation on variable change. - * - * @element ANY - * @param {expression} expression {@link guide.expression Expression} to eval. - * - * @example - * Notice that the counter is incremented - * every time you change the text. -   <doc:example> -     <doc:source> -      <div ng:init="counter=0" ng:watch="name: counter = counter+1"> -        <input type="text" name="name" value="hello"><br/> -        Change counter: {{counter}} Name: {{name}} -      </div> -     </doc:source> -     <doc:scenario> -       it('should check ng:watch', function(){ -         expect(using('.doc-example-live').binding('counter')).toBe('2'); -         using('.doc-example-live').input('name').enter('abc'); -         expect(using('.doc-example-live').binding('counter')).toBe('3'); -       }); -     </doc:scenario> -   </doc:example> - */ -//TODO: delete me, since having watch in UI is logic in UI. (leftover form getangular) -angularDirective("ng:watch", function(expression, element){ -  return function(element){ -    var self = this; -    parser(expression).watch()({ -      addListener:function(watch, exp){ -        self.$watch(watch, function(){ -          return exp(self); -        }, element); -      } -    }); -  }; -}); -  function ngClass(selector) {    return function(expression, element){      var existing = element[0].className + ' '; | 
