mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
fix(ng1): grab injector from app. #451
This commit is contained in:
parent
2f706deb26
commit
2dc68a4785
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user