Thursday, 8 August 2013

tracking hasChanges with breeze + angular

tracking hasChanges with breeze + angular

With the following code:
$scope.hasChanges = datacontext.manager.hasChanges;
I'm trying to give the view some insight into whether or not the current
breeze context has any changes to enable/disable some buttons:
<button ng-disabled="!hasChanges()" class="btn btn-warning cancel"
ng-click="cancel()">Cancel</button>
This works if I set true/false in the view, but if I try to call
hasChanges, the buttons are always disabled.
How can I tell the view when there are changes? In knockout I would just
use an observable... I wonder what I'm doing wrong here.

No comments:

Post a Comment