本文整理汇总了TypeScript中ionic-angular.Platform.ready方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Platform.ready方法的具体用法?TypeScript Platform.ready怎么用?TypeScript Platform.ready使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ionic-angular.Platform
的用法示例。
在下文中一共展示了Platform.ready方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: trackEvent
trackEvent(data: GAEvent): any {
this.platform.ready().then(() => {
GoogleAnalytics.trackEvent(data.category, data.action, data.label, data.value);
});
}
示例2: constructor
@ViewChild('mapCanvas') mapElement: ElementRef;/*通过模版变量注入,但类型是元素类型*/
constructor(public confData: ConferenceData, public platform: Platform) {
this.platform.ready().then((readySource) => {
this.locate();
// Platform now ready, execute any required native code
});
}
示例3: constructor
constructor(private platform: Platform, private storage: Storage, private transfer: FileTransfer, private file: File) {
this.platform.ready().then(_ => {
this.fileTransfer = this.transfer.create();
});
}
示例4: constructor
// constructor(public navCtrl: NavController, public platform: Platform, public navParams: NavParams) {
// this.post = navParams.get('post');
// }
// ngAfterViewInit() {
// this.platform.ready().then(() => {
// this.loadMap();
// });
// }
// loadMap(){
// GoogleMap.isAvailable().then(() => {
// let location = new GoogleMapsLatLng(this.post.latitude, this.post.longitude);
// this.map = new GoogleMap('map', {
// 'backgroundColor': 'white',
// 'controls': {
// 'compass': true,
// 'myLocationButton': true,
// 'indoorPicker': true,
// 'zoom': true
// },
// 'gestures': {
// 'scroll': true,
// 'tilt': true,
// 'rotate': true,
// 'zoom': true
// },
// 'camera': {
// 'latLng': location,
// 'tilt': 30,
// 'zoom': 15,
// 'bearing': 50
// }
// });
// });
// this.map.on(GoogleMapsEvent.MAP_READY).subscribe(() => {
// console.log('Map is ready!');
// });
// }
constructor(public _navController: NavController, public platform: Platform, public navParams: NavParams) {
this.post = navParams.get('post');
this.platform.ready().then(() => this.onPlatformReady());
}
示例5: launch
launch(url) {
this.platform.ready().then(() => {
this.inAppBrowser.create(url, '_system');
});
}
示例6: constructor
public constructor(platform: Platform) {
super();
this.rootPage = SearchPage;
platform.ready().then(() => this.onReady());
}
示例7: constructor
constructor(public platform: Platform, public storage: Storage, public db: SQLite) {
console.log("in constructor");
this.platform.ready().then(() => {
this.initDB();
});
}
示例8: mailto
/**
* opens the mail app with new email to "email"
* @param email email adress for the message
*/
mailto(email) {
this.platform.ready().then(() => {
open(`mailto:${email}`, '_system', "location=true");
});
}
示例9: openURL
/**
* opens the url with the system app if installed or in the browser
* @param url url of the website
*/
openURL(url) {
this.platform.ready().then(() => {
open(url, "_system", "location=true");
});
}
示例10: initializeApp
initializeApp() {
this.platform.ready().then(() => {
StatusBar.styleDefault();
Splashscreen.hide();
});
}