I have the following service in my app:
uaInProgressApp.factory(\'uaProgressService\',
function(uaApiInterface, $timeout, $rootScope){
var facto
I'm not sure if thats help but what I am doing is bind the function to $scope.value. For example
angular
.module("testApp", [])
.service("myDataService", function(){
this.dataContainer = {
valA : "car",
valB : "bike"
}
})
.controller("testCtrl", [
"$scope",
"myDataService",
function($scope, myDataService){
$scope.data = function(){
return myDataService.dataContainer;
};
}]);
Then I just bind it in DOM as
This way you can avoid to using $watch in your code.