mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(ng1): Copy object properly. Fixes #357
This commit is contained in:
parent
2503ef2ee5
commit
9ca38cd8a1
@ -15,14 +15,11 @@ export function initAngular1(plugins) {
|
||||
|
||||
(function(serviceName, cls, name) {
|
||||
window.angular.module('ionic.native').service(serviceName, [function() {
|
||||
let funcs = {};
|
||||
for (var k in cls) {
|
||||
funcs[k] = cls[k];
|
||||
}
|
||||
funcs['name'] = name;
|
||||
var funcs = window.angular.copy(cls);
|
||||
funcs.prototype['name'] = name;
|
||||
return funcs;
|
||||
}]);
|
||||
})(serviceName, cls, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user