Watch is not being called on change in the item. It works on load, and loads the map correctly. However when I change event_type
with a drop down, and it never makes it inside the function. I checked with concole.log
.
Actual event_type
does change, it displays new value on the screen with {{ event_type.type }}
$scope.event_type = { id: 0, type:'All' }
$scope.$watch( 'event_type', function(val) {
$scope.markers = Events.venues(val.type)
}, true)