Skip to content

Commit

Permalink
use scope. to ensure immediate scope update
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnsolo committed Apr 17, 2015
1 parent 5eafc24 commit 368c41f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/directives/marker.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
if(attrs.onClick) {
var clickFn = $parse(attrs.onClick, null, true);
_marker.on('click', function() {
clickFn(scope, {$event:event});
scope.$apply(function() {
clickFn(scope, {$event:event});
});
});
}
}
Expand Down

0 comments on commit 368c41f

Please sign in to comment.