Registering Providers in Angular 6
Now, in angular 6 there is no need to do that and you can use the new providedIn property of @Injectable decorator:
Now, in angular 6 there is no need to do that and you can use the new providedIn property of @Injectable decorator: