1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | export function initAngular1(plugins) {
|
7 | if (typeof window !== 'undefined' && window.angular) {
|
8 | var ngModule_1 = window.angular.module('ionic.native', []);
|
9 | for (var name_1 in plugins) {
|
10 | var serviceName = '$cordova' + name_1;
|
11 | var cls = plugins[name_1];
|
12 | (function (serviceName, cls, name) {
|
13 | ngModule_1.service(serviceName, [
|
14 | function () {
|
15 | var funcs = window.angular.copy(cls);
|
16 | funcs.__proto__['name'] = name;
|
17 | return funcs;
|
18 | },
|
19 | ]);
|
20 | })(serviceName, cls, name_1);
|
21 | }
|
22 | }
|
23 | }
|
24 |
|
\ | No newline at end of file |