Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For an angular-firebase setup , I have the following factory
- .factory('ExpenseResource',function(UserService,$firebase){
- var ref=new Firebase("https://asdfsadf.firebaseio.com/company/"+UserService.company_name+'/days/'+UserService.today.toDateString()+'/expenses');
- return $firebase(ref);
- });
- and in the controller I have
- $scope.$watch('today',function(d){
- //Load all the expenses and advances
- ExpenseResource.$asArray().$loaded().then(function (exp) {
- $scope.expenses = exp;
- });
- });
- But the ExpenseResource does not load for the second time when I change $scope.today : Why is that ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement