fix(angular): adds missing events

This commit is contained in:
Manu Mtz.-Almeida
2018-04-22 17:01:29 +02:00
parent 822f60f603
commit c929dad2e9
2 changed files with 41 additions and 1 deletions

View File

@ -8,6 +8,12 @@ export function inputs(instance: any, el: ElementRef, props: string[]) {
});
}
export function proxyEvent(emitter: any, el: Node, eventName: string) {
el.addEventListener(eventName, (ev) => {
emitter.emit(ev);
});
}
export function proxyMethod(ctrlName: string, methodName: string, ...args: any[]) {
const controller = ensureElementInBody(ctrlName);