support compilation in HTML widgets

This commit is contained in:
Misko Hevery 2011-01-13 10:50:33 -08:00
parent 347be5ae9a
commit 1d7b9d5626
2 changed files with 3 additions and 1 deletions

View file

@ -509,6 +509,7 @@ function inputWidget(events, modelAccessor, viewAccessor, initFn, textBox) {
function inputWidgetSelector(element){
this.directives(true);
this.descend(true);
return INPUT_TYPE[lowercase(element[0].type)] || noop;
}

View file

@ -302,9 +302,10 @@ describe("widget", 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);
expect(scope.$get('clicked')).toEqual(true);
expect(scope.$element.text()).toEqual("Click Me.");
});
describe('radio', function(){