From c5ae6362d7771b62ae35a6b8ddc6e866aa9964a9 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Wed, 20 Feb 2019 17:40:13 +0100 Subject: [PATCH] refactor(template): update Inject decorator --- scripts/templates/wrap-min.tmpl | 4 +++- scripts/templates/wrap.tmpl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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 { /**