From 2dc68a4785b7d9218a0d5bb936efd35cbb554e1b Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Thu, 1 Sep 2016 13:37:43 -0500 Subject: [PATCH] fix(ng1): grab injector from app. #451 --- src/plugins/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/plugin.ts b/src/plugins/plugin.ts index 305aa57fc..e0eaa1587 100644 --- a/src/plugins/plugin.ts +++ b/src/plugins/plugin.ts @@ -108,7 +108,7 @@ function callCordovaPlugin(pluginObj: any, methodName: string, args: any[], opts function getPromise(cb) { if (window.angular) { - let $q = window.angular.injector(['ng']).get('$q'); + let $q = window.angular.element(document.body).injector().get('$q'); return $q((resolve, reject) => { cb(resolve, reject); });