refactor(-): cleanup

This commit is contained in:
Ibrahim Hadeed 2016-04-29 21:50:09 -04:00
parent 94a8a296c1
commit 2efce5dcb7
3 changed files with 0 additions and 9 deletions

View File

@ -156,9 +156,7 @@ function wrapObservable(pluginObj:any, methodName:string, args:any[], opts:any =
}
function callInstance(pluginObj:any, methodName : string, args:any[], opts:any = {}, resolve? : Function, reject? : Function){
//if(!systemCheck(null, pluginObj, methodName, resolve, reject)) return;
args = setIndex(args, opts, resolve, reject);
console.log("!====!", pluginObj, methodName, args);
return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance, args);
}
@ -286,10 +284,8 @@ export function Cordova(opts:any = {}) {
*/
export function CordovaInstance(opts:any = {}) {
return (target: Object, methodName: string) => {
console.log("P-A", target, methodName, opts);
return {
value: function(...args: any[]) {
console.log("P-B", ...args);
return wrapInstance(this, methodName, opts).apply(this, args);
}
}
@ -306,7 +302,6 @@ export function CordovaProperty(target: Function, key: string, descriptor: Typed
let originalMethod = descriptor.get;
descriptor.get = function(...args: any[]) {
// console.log('Calling', this);
if(!window.cordova) {
cordovaWarn(this.name, null);
return {};

View File

@ -1,5 +1,4 @@
export function get(obj, path) {
console.log(obj, path);
for(var i = 0, path = path.split('.'), len = path.length; i < len; i++) {
if(!obj) { return null; }
obj = obj[path[i]];

View File

@ -2,7 +2,6 @@
<html ng-app="app">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="sql.js"></script>
<script src="../../dist/ionic.native.js"></script>
<script src="app.js"></script>
</head>
@ -11,7 +10,5 @@
<script>
angular.module('app', []);
</script>
<!-- div to test googlemaps plugin -->
<div id="gmap"></div>
</body>
</html>