javascript - angularjs scope variable not updated outside directive -


i'm learning directives , have scenario set update $scope value inside of directive's controller. works fine within directive, $scope variable outside of directive not getting updated.

i have created plunk illustrate behavior. in plunk you'll see scope variable gets updated inside of directive when clicking reset button.

note: tried using $scope.$apply(); seen in post not work. throws apply in progress error. read isn't way it. mention why?

you haven't send day value directive this:

<mydirective data-day="day"></mydirective> 

Comments