|Use custom service in config()||wingy||8/14/12 11:18 PM|
|Re: Use custom service in config()||Marco Alves||8/15/12 3:05 AM|
Just out of curiosity, why are you doing that?
|Re: [AngularJS] Use custom service in config()||Pawel Kozlowski||8/15/12 3:23 AM|
It won't work since during the config phase service instances are not
created yet. You've got access to providers only (which are kind of
blueprints for creating instances). What you could do is to use the
'run' phase to do something with your service instances:
1) In the config phase you've got only access to constants and
providers. Instances are not yet created at this point.
2) In the run phase instances are already created, you can't play with
providers anymore here.
Check the "Module Loading & Dependencies" section in
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To post to this group, send email to ang...@googlegroups.com.
> To unsubscribe from this group, send email to
> Visit this group at http://groups.google.com/group/angular?hl=en.
|Re: [AngularJS] Use custom service in config()||Johnny Luu||8/15/12 4:37 AM|
The thing I want to do is to log each HTTP response and request.
And for that to happen I need to use MyLogger inside config() since there is where you configure the $http request and response formatters.
It seems that there is no way to do this in the config() handler.
|Re: [AngularJS] Re: Use custom service in config()||Johnny Luu||8/15/12 4:38 AM|
Read my other response.
--You received this message because you are subscribed to the Google Groups "AngularJS" group.