fix(compiler): use event names for matching directives

Closes #6870
This commit is contained in:
vsavkin
2016-02-03 11:35:42 -08:00
committed by Brian Ford
parent e725542703
commit 231773ea76
3 changed files with 34 additions and 2 deletions

View File

@ -327,6 +327,15 @@ export function main() {
]);
});
it('should locate directives in event bindings', () => {
var dirA = CompileDirectiveMetadata.create(
{selector: '[a]', type: new CompileTypeMetadata({name: 'DirB'})});
expect(humanizeTplAst(parse('<div (a)="b">', [dirA])))
.toEqual(
[[ElementAst, 'div'], [BoundEventAst, 'a', null, 'b'], [DirectiveAst, dirA]]);
});
it('should parse directive host properties', () => {
var dirA = CompileDirectiveMetadata.create({
selector: 'div',