This plunk refers.
I have two simple element (restrict: "E") directives, incButtonOne and incButtonTwo, that track and display the number of times it has been clicked. They both implement local controllers and have isolate scope. The two directives accomplish the same thing but with slightly different implementations:
incButtonOne's template includes ang-clickdirective in the tag to facilitate the click counting by calling a function in the directive's controllerincButtonTwoimplements alinkfunction to register a click event handler that calls the incrementing function in the directive's controller
They both work. Kind of. The problem is that incButtonTwo's displayed value is only updated after incButtonOne is clicked, i.e. the value is in fact updated (this can be confirmed by uncommenting the alert statement on line 45) but it's not being displayed until some other action is performed.
I would just like to understand why this is happening and how to fix it. Thanks!