Hi there,
I was reluctant to do any Javascript programming untill I came across
AngularJs.
I was able to create controllers, partial views, services and do a lot of
staff.
Except, the possibility to do Service to Service communication..
Below, the code:
myModule.service('Service1', function () {
this.doSomething = function (){
console.log("from within Service1");
}
}
myModule.service('Service2', function () {
this.doSomething = function (){
Service1.doSomething();
}
}
How can I make it work ? is it possible to inject the unique Service1
instance into Service2 ?
If it is possible, how can I do it ?
Thanks!
--
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.