mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 11:37:38 +08:00
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
This commit is contained in:
@@ -295,18 +295,6 @@ describe("widget", function(){
|
||||
expect(scope.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.clicked).toEqual(true);
|
||||
});
|
||||
|
||||
it('should support button alias', function(){
|
||||
compile('<button ng:change="clicked = true">Click {{"Me"}}.</button>');
|
||||
browserTrigger(element);
|
||||
expect(scope.clicked).toEqual(true);
|
||||
expect(scope.$element.text()).toEqual("Click Me.");
|
||||
});
|
||||
|
||||
describe('radio', function(){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user