diff --git a/scripts/templates/wrap-min.tmpl b/scripts/templates/wrap-min.tmpl index 4548c510d..30c6486b7 100644 --- a/scripts/templates/wrap-min.tmpl +++ b/scripts/templates/wrap-min.tmpl @@ -43,7 +43,9 @@ import { Observable } from 'rxjs'; installVariables: [], // OPTIONAL the plugin requires variables platforms: [] // Array of platforms supported, example: ['Android', 'iOS'] }) -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class {{ PluginName }} extends IonicNativePlugin { /** diff --git a/scripts/templates/wrap.tmpl b/scripts/templates/wrap.tmpl index 4548c510d..30c6486b7 100644 --- a/scripts/templates/wrap.tmpl +++ b/scripts/templates/wrap.tmpl @@ -43,7 +43,9 @@ import { Observable } from 'rxjs'; installVariables: [], // OPTIONAL the plugin requires variables platforms: [] // Array of platforms supported, example: ['Android', 'iOS'] }) -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class {{ PluginName }} extends IonicNativePlugin { /**