import { Component , ViewChild } from '@angular/core' ; import { Nav , Platform } from 'ionic-angular' ; import { StatusBar } from '@ionic-native/status-bar' ; import { SplashScreen } from '@ionic-native/splash-screen' ; import { HomePage } from '../pages/home/home' ; import { PolylinePage } from '../pages/polyline/polyline' ; import { PolygonPage } from '../pages/polygon/polygon' ; import { BaseArrayClassPage } from '../pages/base-array-class/base-array-class' ; import { HtmlInfoWindowPage } from '../pages/html-info-window/html-info-window' ; import { MarkerClusterPage } from '../pages/marker-cluster/marker-cluster' ; import { GeocodingPage } from '../pages/geocoding/geocoding' ; import { MarkerPage } from '../pages/marker/marker' ; import { CirclePage } from '../pages/circle/circle' ; import { GroundOverlayPage } from '../pages/ground-overlay/ground-overlay' ; import { TileOverlayPage } from '../pages/tile-overlay/tile-overlay' ; import { KmlOverlayPage } from '../pages/kml-overlay/kml-overlay' ; import { StreetViewPage } from '../pages/street-view/street-view' ; @ Component ( { templateUrl : 'app.html' } ) export class MyApp { @ ViewChild ( Nav ) nav : Nav ; rootPage : any ; pages : Array < { title : string ; component : any ; } > ; constructor ( public platform , public statusBar , public splashScreen ) { this . initializeApp ( ) ; this . pages = [ { title : 'Home' , component : HomePage } , { title : 'Marker' , component : MarkerPage } , { title : 'MarkerCluster' , component : MarkerClusterPage } , { title : 'HtmlInfoWindow' , component : HtmlInfoWindowPage } , { title : 'Circle' , component : CirclePage } , { title : 'Polyline' , component : PolylinePage } , { title : 'Polygon' , component : PolygonPage } , { title : 'GroundOverlay' , component : GroundOverlayPage } , { title : 'TileOverlay' , component : TileOverlayPage } , { title : 'KmlOverlay' , component : KmlOverlayPage } , { title : 'Geocoding' , component : GeocodingPage } , { title : 'BaseArrayClass' , component : BaseArrayClassPage } , { title : 'StreetView' , component : StreetViewPage } ] ; } initializeApp ( ) { this . platform . ready ( ) . then ( ( ) => { this . rootPage = HomePage ; this . statusBar . styleDefault ( ) ; this . splashScreen . hide ( ) ; } ) ; } openPage ( page ) { this . nav . setRoot ( page . component ) ; } }