I\'ve built a basic app in Angular, but I have encountered a strange issue where I cannot inject a service into one of my components. It injects fine into any of the three o
In my case, it happened because I didn't declare the type for a constructor parameter.
I had something like this:
constructor(private URL, private http: Http) { }
and then changing it to the code below solved my problem.
constructor(private URL : string, private http: Http) {}