You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But only if I change my bootstrap, I can run the code..
bootstrap(Application,[httpInjectables]);
Any ideas why is this happening?
I mean, if I want my service component to be distributed to other applications, I need to add httpInjectables to bootstrap? Seems wrong... The idea of NG2 was to build scalable and independent components.
Problem 2
If I request a non existing resource (it also happens locally):
The status body id correct, but the status code is not and always returns 200.
You need to add HTTP injectables, because Angular can't possibly know what you intend to use across your application. For example, you may use a 3rd party HTTP or Router solution.
Thank you both for replying!
About the httpInjectables: imagine i have an application that does not need http requests, and you have a component that I found very useful, I would like to had the component, but that component of yours uses http.
Again, i should only importante your component, nothing more.. But that's my opinion..
Activity
[-]Http Injectables[/-][+]Http Requests and Http Injectables[/+]matanlurey commentedon Jul 17, 2015
You need to add HTTP injectables, because Angular can't possibly know what you intend to use across your application. For example, you may use a 3rd party HTTP or Router solution.
The second issue looks legit. @alxhub
PatrickJS commentedon Jul 17, 2015
the first problem is due to appInjector(boostrap bindings) vs viewInjector vs hostInjector
the second problem might be solved with #2667 and #2882
tbragaf commentedon Jul 17, 2015
Thank you both for replying!
About the httpInjectables: imagine i have an application that does not need http requests, and you have a component that I found very useful, I would like to had the component, but that component of yours uses http.
Again, i should only importante your component, nothing more.. But that's my opinion..
Still, gonna close this.
Best regards,
Tiago Braga
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.