Questions tagged [angular2-providers]

52 questions
0
votes
1 answer

Angular2 providers

I am not fully grasping providers and can't figure this one out. I have a class with a constructor as so: constructor(private http:Http, private url:string, private ext:string){} Within the bootstrap how do I tell the DI to supply the Http but…
ZaksBack
  • 189
  • 3
  • 10
0
votes
2 answers

What are these 3 Angular2 commands importing?

I am studying Angular2 in ES6 JavaScript using this sample app. Specifically, I am trying to map out the chain of dependencies starting at the root JavaScript file for the entire app, which is boot.js. Can someone please explain what exactly is…
FirstOfMany
  • 185
  • 2
  • 7
0
votes
3 answers

Use custom Http service in Ionic 2 app

I have some things I want to do with every HTTP request in my Ionic 2 app (v2.0.0-beta.30), so I have created my own Http class that extends angular's service. Something like this: @Injectable() export class myHttp extends Http { private…
dnc253
  • 39,967
  • 41
  • 141
  • 157
0
votes
2 answers

No provider for HttpService

When I run the following project I get the error: No provider for HttpService! (AppComponent -> HttpService) Can someone help me please? my AppComponent: import {Component} from 'angular2/core'; import {HttpService} from…
Soli
  • 842
  • 2
  • 11
  • 24
0
votes
1 answer

Angular2 - List of providers as a constant not working

I'm trying to created a wrapper for the XHRBackend class and I've been able to successfully create and use all the provided services in my outermost AppComponent but I can't package the providers in the actual service itself. I am injecting the…
sgcharlie
  • 1,006
  • 1
  • 10
  • 25
0
votes
2 answers

No provider for Service

I'm trying to get into angular2 using 2.0.0-beta.17. I want to read data from a service but no matter what I do I get an exception: No provider for LanguageBrowser! I went through dozens of the same questions here but none of them worked. This is…
0
votes
1 answer

Angular 2 angular2.dev.js:23925 EXCEPTION: Error: Uncaught (in promise): No provider for

I'm trying to load an Angular Service (DataService) which has a configuration file (datService.configuration) into a Component (Home). In my Home component, if I don't add DataServiceConfiguration to the providers list, I get the following…
FelipeDrumond
  • 64
  • 1
  • 6
1 2 3
4