Missing `providedIn` propertyJS-0579
angular
Using the providedIn property makes classes decorated with @Injectable tree shakeable.
If you use providedIn, the injectable is registered as a provider of the module without adding it to the provider list of the module.
Bad Practice
@Injectable()
class Test {}
Recommended
@Injectable({
providedIn: 'root'
})
class Test {}
@Injectable({
providedIn: SomeModule
})
class Test {}