I could have sworn I had this working earlier but now I just cannot get the parent scope to update and display on the page.
In the parent I have some a simple scope I want to update from the directive. In the parent controller I set it like this.
$scope.messageContent = 'The initial content';
In the parent view I have it displayed
{{$scope.messageContent}}
I made it very simple for a test and here is the directive. In my link function in the directive I have this code:
link: function (scope, element, attrs) {
scope.$parent.messageContent = 'New content';
}
It simply will not update the parent. What am I missing here?
Thanks