From 96bf124429809a595e7c1aefc1c66769d7a1bb98 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Sun, 20 Nov 2016 21:42:37 +0100 Subject: [PATCH] fix(core/directives/host): execute HostListener method within sync $apply instead of next tick - this properly allows to handle user events on input elements like in angular 2 Closes #171 --- src/core/directives/host/host_resolver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/directives/host/host_resolver.ts b/src/core/directives/host/host_resolver.ts index 17b590c..8cc63cf 100644 --- a/src/core/directives/host/host_resolver.ts +++ b/src/core/directives/host/host_resolver.ts @@ -114,7 +114,7 @@ export function _setHostListeners( const cbParams: any[] = _getHostListenerCbParams( evt, methodParams ); - scope.$applyAsync( ()=> { + scope.$apply( ()=> { const noPreventDefault = ctrl[ methodName ]( ...cbParams );