mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-20 16:30:26 +00:00
support compilation in HTML widgets
This commit is contained in:
parent
347be5ae9a
commit
1d7b9d5626
2 changed files with 3 additions and 1 deletions
|
|
@ -509,6 +509,7 @@ function inputWidget(events, modelAccessor, viewAccessor, initFn, textBox) {
|
||||||
|
|
||||||
function inputWidgetSelector(element){
|
function inputWidgetSelector(element){
|
||||||
this.directives(true);
|
this.directives(true);
|
||||||
|
this.descend(true);
|
||||||
return INPUT_TYPE[lowercase(element[0].type)] || noop;
|
return INPUT_TYPE[lowercase(element[0].type)] || noop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -302,9 +302,10 @@ describe("widget", function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support button alias', function(){
|
it('should support button alias', function(){
|
||||||
compile('<button ng:change="clicked = true">Click Me</button>');
|
compile('<button ng:change="clicked = true">Click {{"Me"}}.</button>');
|
||||||
browserTrigger(element);
|
browserTrigger(element);
|
||||||
expect(scope.$get('clicked')).toEqual(true);
|
expect(scope.$get('clicked')).toEqual(true);
|
||||||
|
expect(scope.$element.text()).toEqual("Click Me.");
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('radio', function(){
|
describe('radio', function(){
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue