mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-25 16:29:49 -04:00
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import {Component, ViewChild} from '@angular/core';
|
|
import {ionicBootstrap, Platform, MenuController, Nav} from 'ionic-angular';
|
|
import {StatusBar} from 'ionic-native';
|
|
import {SearchPage} from './pages/search/search';
|
|
|
|
|
|
@Component({
|
|
templateUrl: 'build/app.html'
|
|
})
|
|
class MyApp
|
|
{
|
|
@ViewChild(Nav) nav: Nav;
|
|
|
|
// make HelloIonicPage the root (or first) page
|
|
rootPage: any = SearchPage;
|
|
pages: Array<{ title: string, component: any }>;
|
|
|
|
constructor(
|
|
public platform: Platform,
|
|
public menu: MenuController
|
|
)
|
|
{
|
|
this.initializeApp();
|
|
|
|
// set our app's pages
|
|
this.pages = [];
|
|
}
|
|
|
|
initializeApp()
|
|
{
|
|
this.platform.ready().then(() =>
|
|
{
|
|
// Okay, so the platform is ready and our plugins are available.
|
|
// Here you can do any higher level native things you might need.
|
|
StatusBar.styleDefault();
|
|
});
|
|
}
|
|
|
|
openPage(page)
|
|
{
|
|
// close the menu when clicking a link from the menu
|
|
this.menu.close();
|
|
// navigate to the new page if it is not the current page
|
|
this.nav.setRoot(page.component);
|
|
}
|
|
}
|
|
|
|
ionicBootstrap(MyApp); |