I'm learning Angular, I have a simple directive that render a select
. On the ng-change
of that select I'm calling a method in the controller of my directive:
$scope.changeSelect = function(selectedValue) {
exampleService.setNewValue(selectedValue)
}
that service that I have created, updates an example value I have created.
Besides that, I have another controller and a view that renders the directive. In that view.
How can I tell the controller that the directive has changed, and do something with the data?