Hi,
i need some help understanding data-binding with services.
i want to update some values after they have changed in a service. i want
to use my services within the controllers as simple as possible by just
define "$scope.exampleObject.exampleValue=MyService.aFunction(key)".
by using the $resource service for updating a value inside my service (the
server respond with a little timeout), every change at myservice data is
shown without any $watch, ... or something - just magic. thats what i want
- but not only if there is some $resource usage inside.
<>{{statuskey1}}</> with $scope.statuskey1=MyService.getStatus(key1) works
not
<>{{Service.getStatus(key1)}}</> with $scope.Service=MyService works fine,
but i want to use this status and more informations inside a directive
<>{{myObject.key1.status)}}</> with
$scope.myObject.key1.status=MyService.getStatus(key1) works, if i use a
$resource service for updating a value
<>{{myObject.key1.status)}}</> with
$scope.myObject.key1.status=MyService.getStatus(key1) works not, if i use a
$timeout, a $http.then() or whatever for updating a value
please help me to understand, why its not possible to reference a
scope-property to a service-function inside the controller instead of
inside the html.
please help me to understand, why the $resource service makes it possible
somehow.
thanks a lot,
Paul
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.