awesome-cordova-plugins/demo/www/app/home/home.js

38 lines
589 B
JavaScript
Raw Normal View History

2015-11-29 06:17:04 +08:00
import {Page, NavController} from 'ionic/ionic'
2015-11-30 07:20:11 +08:00
import {
ActionSheet,
Camera,
Device,
StatusBar,
Toast
} from 'ionic-native';
2015-11-29 06:17:04 +08:00
import {Plugin} from '../plugin/plugin';
@Page({
templateUrl: 'app/home/home.html',
})
export class HomePage {
constructor(nav: NavController) {
this.nav = nav;
this.plugins = [
2015-11-30 06:30:15 +08:00
ActionSheet,
2015-11-29 06:17:04 +08:00
Camera,
2015-11-30 07:20:11 +08:00
Device,
2015-11-29 06:24:38 +08:00
StatusBar,
Toast
2015-11-30 11:50:58 +08:00
].filter((p) => {
return !!p;
});
2015-11-29 06:17:04 +08:00
console.log('PLUGINS', this.plugins);
}
choosePlugin(plugin) {
this.nav.push(Plugin, {
plugin: plugin
});
}
}