mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
Demo
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import {Page, NavParams} from 'ionic/ionic';
|
||||
|
||||
@Page({
|
||||
templateUrl: 'app/plugin/plugin.html',
|
||||
})
|
||||
export class Plugin {
|
||||
constructor(params: NavParams) {
|
||||
|
||||
this.plugin = params.get('plugin');
|
||||
console.log('Plugin', this.plugin);
|
||||
|
||||
this.methods = Object.keys(this.plugin).filter((k) => {
|
||||
if(typeof this.plugin[k] === 'function') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
doMethod(method) {
|
||||
console.log('Doing method', method, 'on Plugin', this.plugin);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user