diff options
| author | Di Peng | 2011-08-05 15:01:58 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-08-06 01:54:05 -0700 | 
| commit | 142cffcf64d2dce93089e9a73257bddf50e96990 (patch) | |
| tree | 293b5191be9a5b2eb8d7eb8f335c180fe4a2735a /src | |
| parent | 862d78c1d96a22ae215ec272e6f0d07b374421bf (diff) | |
| download | angular.js-142cffcf64d2dce93089e9a73257bddf50e96990.tar.bz2 | |
refactor(widgets): remove input[button, submit, reset, image] and button windgets
These widgets are useless and only trigger extra $updateViews.
The only reason we had them was to support ng:change on these widgets,
but since there are no bindings present in these cases it doesn't make
sense to support ng:change here. It's likely just a leftover from
getangular.com
Breaking change: ng:change for input[button], input[submit], input[reset], input[image]
and button widgets is not supported any more
Diffstat (limited to 'src')
| -rw-r--r-- | src/widgets.js | 7 | 
1 files changed, 1 insertions, 6 deletions
| diff --git a/src/widgets.js b/src/widgets.js index a2a4109b..438fccb3 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -445,16 +445,11 @@ function noopAccessor() { return { get: noop, set: noop }; }   *   */  var textWidget = inputWidget('keydown change', modelAccessor, valueAccessor, initWidgetValue(), true), -    buttonWidget = inputWidget('click', noopAccessor, noopAccessor, noop),      INPUT_TYPE = {        'text':            textWidget,        'textarea':        textWidget,        'hidden':          textWidget,        'password':        textWidget, -      'button':          buttonWidget, -      'submit':          buttonWidget, -      'reset':           buttonWidget, -      'image':           buttonWidget,        'checkbox':        inputWidget('click', modelFormattedAccessor, checkedAccessor, initWidgetValue(false)),        'radio':           inputWidget('click', modelFormattedAccessor, radioAccessor, radioInit),        'select-one':      inputWidget('change', modelAccessor, valueAccessor, initWidgetValue(null)), @@ -566,7 +561,7 @@ function inputWidgetSelector(element){  angularWidget('input', inputWidgetSelector);  angularWidget('textarea', inputWidgetSelector); -angularWidget('button', inputWidgetSelector); +  /**   * @workInProgress | 
