trackEvent(data: GAEvent): any {
        this.platform.ready().then(() => {
      GoogleAnalytics.trackEvent(data.category, data.action, data.label, data.value);
    });
    }
Example #2
0
 @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
   });
 }
Example #3
0
 constructor(private platform: Platform, private storage: Storage, private transfer: FileTransfer, private file: File) {
   this.platform.ready().then(_ => {
     this.fileTransfer = this.transfer.create();
   });
 }
Example #4
0
//     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());
  }
Example #5
0
 launch(url) {
   this.platform.ready().then(() => {
     this.inAppBrowser.create(url, '_system');
   });
 }
Example #6
0
  public constructor(platform: Platform) {
    super();
    this.rootPage = SearchPage;
    platform.ready().then(() => this.onReady());

  }
 constructor(public platform: Platform, public storage: Storage, public db: SQLite) {
   console.log("in constructor");
   this.platform.ready().then(() => {
     this.initDB();
   });
 }
Example #8
0
 /**
  * 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");
     });
 }
Example #9
0
 /**
  * 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");
     });
 }
Example #10
0
  initializeApp() {
   this.platform.ready().then(() => {
     StatusBar.styleDefault();
     Splashscreen.hide();
   });
 }