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.
從本錯誤所指出的缺少提供者(No provider for ${this}!)的物件開始進行工作。這通常會在服務中丟擲,因為它請求了一個不存在的提供者。
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.
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.