aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets.js7
-rw-r--r--test/widgetsSpec.js20
2 files changed, 1 insertions, 26 deletions
diff --git a/src/widgets.js b/src/widgets.js
index 04d64eee..8a97f61b 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -447,16 +447,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)),
@@ -567,7 +562,7 @@ function inputWidgetSelector(element){
angularWidget('input', inputWidgetSelector);
angularWidget('textarea', inputWidgetSelector);
-angularWidget('button', inputWidgetSelector);
+
/**
* @workInProgress
diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js
index 225f0a1f..2f0ab6a3 100644
--- a/test/widgetsSpec.js
+++ b/test/widgetsSpec.js
@@ -293,18 +293,6 @@ describe("widget", function(){
expect(scope.$get('name')).toEqual('Kai');
});
- it('should call ng:change on button click', function(){
- compile('<input type="button" value="Click Me" ng:change="clicked = true"/>');
- browserTrigger(element);
- expect(scope.$get('clicked')).toEqual(true);
- });
-
- it('should support button alias', function(){
- compile('<button ng:change="clicked = true">Click {{"Me"}}.</button>');
- browserTrigger(element);
- expect(scope.$get('clicked')).toEqual(true);
- expect(scope.$element.text()).toEqual("Click Me.");
- });
describe('radio', function(){
@@ -417,14 +405,6 @@ describe("widget", function(){
expect(scope.$service('$log').error.logs.shift()[0]).
toMatchError(/Syntax Error: Token '''' is an unexpected token/);
});
-
- it('should report error on ng:change exception', function(){
- compile('<button ng:change="a-2=x">click</button>');
- browserTrigger(element);
- expect(element.hasClass('ng-exception')).toBeTruthy();
- expect(scope.$service('$log').error.logs.shift()[0]).
- toMatchError(/Syntax Error: Token '=' implies assignment but \[a-2\] can not be assigned to/);
- });
});
describe('ng:switch', function(){