{ "id": "errors/NG0201", "title": "NG0201: No provider for {token} found!", "contents": "

NG0201: No provider for {token} found!link

\n
\n mode_edit\n
\n\n\n
\n \n
\n\n\n\n
\n

Descriptionlink

\n

You see this error when you try to inject a service but have not declared a corresponding provider. A provider is a mapping that supplies a value that you can inject into the constructor of a class in your application.

\n

Read more on providers in our Dependency Injection guide.

\n\n
\n
\n
\n

Debugging the errorlink

\n

Work backwards from the object where the error states that a provider is missing: No provider for ${this}!. This is commonly thrown in services, which require non-existing providers.

\n

To fix the error ensure that your service is registered in the list of providers of an NgModule or has the @Injectable decorator with a providedIn property at top.

\n

The most common solution is to add a provider in @Injectable using providedIn:

\n\n@Injectable({ providedIn: 'app' })\n\n\n
\n\n\n" }