mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
test(): add initial test suite (#523)
This commit is contained in:
committed by
Ibrahim Hadeed
parent
d5513db9bb
commit
1facde3966
+3
-2
@@ -7,14 +7,15 @@ declare var window;
|
||||
*/
|
||||
export function initAngular1(plugins) {
|
||||
if (window.angular) {
|
||||
window.angular.module('ionic.native', []);
|
||||
|
||||
const ngModule = window.angular.module('ionic.native', []);
|
||||
|
||||
for (var name in plugins) {
|
||||
let serviceName = '$cordova' + name;
|
||||
let cls = plugins[name];
|
||||
|
||||
(function(serviceName, cls, name) {
|
||||
window.angular.module('ionic.native').service(serviceName, [function() {
|
||||
ngModule.service(serviceName, [function() {
|
||||
var funcs = window.angular.copy(cls);
|
||||
funcs.prototype['name'] = name;
|
||||
return funcs;
|
||||
|
||||
@@ -3,8 +3,6 @@ import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var window;
|
||||
declare var Promise;
|
||||
declare var $q;
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user