-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
53 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,50 @@ | ||
import { Component, ViewChild } from '@angular/core'; | ||
|
||
import { Component, ViewChild } from '@angular/core'; | ||
import { Platform, MenuController, Nav } from 'ionic-angular'; | ||
import { StatusBar } from 'ionic-native'; | ||
import { ClickerList, Page2 } from '../pages'; | ||
import { Config } from '../config/config'; | ||
|
||
import { StatusBar } from 'ionic-native'; | ||
@Component({ | ||
templateUrl: 'app.html', | ||
}) | ||
export class ClickerApp { | ||
|
||
import { HelloIonicPage } from '../pages/hello-ionic/hello-ionic'; | ||
import { ListPage } from '../pages/list/list'; | ||
@ViewChild(Nav) private nav: Nav; | ||
|
||
private rootPage: any; | ||
private pages: Array<{ title: string, component: any }>; | ||
private menu: MenuController; | ||
private platform: Platform; | ||
|
||
@Component({ | ||
templateUrl: 'app.html' | ||
}) | ||
export class MyApp { | ||
@ViewChild(Nav) nav: Nav; | ||
constructor(platform: Platform, menu: MenuController) { | ||
|
||
// make HelloIonicPage the root (or first) page | ||
rootPage: any = HelloIonicPage; | ||
pages: Array<{title: string, component: any}>; | ||
this.platform = platform; | ||
this.menu = menu; | ||
|
||
constructor( | ||
public platform: Platform, | ||
public menu: MenuController | ||
) { | ||
this.rootPage = ClickerList; | ||
this.initializeApp(); | ||
|
||
// set our app's pages | ||
this.pages = [ | ||
{ title: 'Hello Ionic', component: HelloIonicPage }, | ||
{ title: 'My First List', component: ListPage } | ||
{ title: 'Clickers', component: ClickerList }, | ||
{ title: 'Goodbye Ionic', component: Page2 }, | ||
]; | ||
} | ||
|
||
initializeApp() { | ||
private initializeApp(): void { | ||
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(); | ||
console.log('api URL ' + Config.apiURL); | ||
console.log('api key ' + Config.apiKey); | ||
}); | ||
} | ||
|
||
openPage(page) { | ||
public openPage(page: any): void { | ||
// 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); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { IonicApp, IonicModule } from 'ionic-angular'; | ||
import { MyApp } from './app.component'; | ||
import { HelloIonicPage } from '../pages/hello-ionic/hello-ionic'; | ||
import { ItemDetailsPage } from '../pages/item-details/item-details'; | ||
import { ListPage } from '../pages/list/list'; | ||
import { ClickerApp } from './app.component'; | ||
import { ClickerList } from '../pages'; | ||
import { ClickerForm } from '../components'; | ||
import { ClickerButton } from '../components'; | ||
import { ClickersService } from '../services'; | ||
import { ClickerActions } from '../actions'; | ||
import { Page2 } from '../pages'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
MyApp, | ||
HelloIonicPage, | ||
ItemDetailsPage, | ||
ListPage | ||
ClickerApp, | ||
ClickerList, | ||
Page2, | ||
ClickerForm, | ||
ClickerButton, | ||
], | ||
imports: [ | ||
IonicModule.forRoot(MyApp) | ||
IonicModule.forRoot(ClickerApp), | ||
], | ||
bootstrap: [IonicApp], | ||
entryComponents: [ | ||
MyApp, | ||
HelloIonicPage, | ||
ItemDetailsPage, | ||
ListPage | ||
ClickerApp, | ||
ClickerList, | ||
Page2, | ||
], | ||
providers: [] | ||
providers: [ ClickerActions, ClickersService ], | ||
}) | ||
export class AppModule {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.