本文整理匯總了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();
});
}