Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

13
  • why there's param in the $watch callback? can't I just set $scope.ajaxed = false? but either with that it doesn't work. Strange. Commented Aug 31, 2015 at 13:21
  • It's a listener function defined in the docs, you can click on the link I supplied to read up on the $watch method. Yes, it should be in your main controller. Commented Aug 31, 2015 at 13:25
  • strange it doesn't work still, anything wrong for my service? and my second controller? Commented Aug 31, 2015 at 13:28
  • when I console.log(newVal, oldVal) it return undefined. Commented Aug 31, 2015 at 13:32
  • 1
    I think you should change your $watch variable into $scope.$watch(function(){ return request_service.finished} .... Working fiddle Commented Aug 31, 2015 at 14:01