-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tabs): return promises where appropriate
- Loading branch information
1 parent
c963745
commit a77bb2c
Showing
69 changed files
with
1,109 additions
and
194 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
8 changes: 8 additions & 0 deletions
8
src/components/nav/test/simple-nav-default-history/app/app.component.ts
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
template: `<ion-nav [root]="root" name="default"></ion-nav>` | ||
}) | ||
export class AppComponent { | ||
root = 'FirstPage'; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/components/nav/test/simple-nav-default-history/app/app.module.ts
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { IonicApp, IonicModule } from '../../../../..'; | ||
|
||
import { AppComponent } from './app.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
IonicModule.forRoot(AppComponent, { swipeBackEnabled: true, preloadModules: true }), | ||
], | ||
bootstrap: [IonicApp] | ||
}) | ||
export class AppModule {} |
5 changes: 5 additions & 0 deletions
5
src/components/nav/test/simple-nav-default-history/app/main.ts
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
|
||
import { AppModule } from './app.module'; | ||
|
||
platformBrowserDynamic().bootstrapModule(AppModule); |
10 changes: 10 additions & 0 deletions
10
src/components/nav/test/simple-nav-default-history/pages/first-page/first-page.html
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<ion-header> | ||
<ion-navbar> | ||
<ion-title>First Page</ion-title> | ||
</ion-navbar> | ||
</ion-header> | ||
<ion-content> | ||
Page One | ||
<button ion-button (click)="goToPageTwo()">Go to Page Two</button> | ||
<a href="#/nav/n4/user/123/name/ted">Using href</a> | ||
</ion-content> |
13 changes: 13 additions & 0 deletions
13
src/components/nav/test/simple-nav-default-history/pages/first-page/first-page.module.ts
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { IonicPageModule } from '../../../../../..'; | ||
import { FirstPage } from './first-page'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
IonicPageModule.forChild(FirstPage) | ||
], | ||
declarations: [ | ||
FirstPage | ||
] | ||
}) | ||
export class FirstPageModule { } |
15 changes: 15 additions & 0 deletions
15
src/components/nav/test/simple-nav-default-history/pages/first-page/first-page.ts
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component } from '@angular/core'; | ||
import { IonicPage, NavController, } from '../../../../../..'; | ||
|
||
@IonicPage() | ||
@Component({ | ||
templateUrl: 'first-page.html' | ||
}) | ||
export class FirstPage { | ||
constructor(public nav: NavController) { | ||
} | ||
|
||
goToPageTwo() { | ||
this.nav.push('SecondPage', { userId: '123', name: 'ted'}); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/components/nav/test/simple-nav-default-history/pages/second-page/second-page.html
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<ion-header> | ||
<ion-navbar> | ||
<ion-title>Second Page</ion-title> | ||
</ion-navbar> | ||
</ion-header> | ||
<ion-content> | ||
<div> | ||
User ID: {{userId}} | ||
</div> | ||
<div> | ||
Name {{name}} | ||
</div> | ||
<div> | ||
<button ion-button (click)="goToNextPage()">Go to Next Page</button> | ||
</div> | ||
</ion-content> |
13 changes: 13 additions & 0 deletions
13
src/components/nav/test/simple-nav-default-history/pages/second-page/second-page.module.ts
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { IonicPageModule } from '../../../../../..'; | ||
import { SecondPage } from './second-page'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
IonicPageModule.forChild(SecondPage) | ||
], | ||
declarations: [ | ||
SecondPage | ||
] | ||
}) | ||
export class SecondPageModule { } |
25 changes: 25 additions & 0 deletions
25
src/components/nav/test/simple-nav-default-history/pages/second-page/second-page.ts
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component } from '@angular/core'; | ||
import { IonicPage, NavController, NavParams } from '../../../../../..'; | ||
|
||
@IonicPage({ | ||
segment: 'user/:userId/name/:name', | ||
defaultHistory: [ | ||
'FirstPage' | ||
] | ||
}) | ||
@Component({ | ||
templateUrl: 'second-page.html' | ||
}) | ||
export class SecondPage { | ||
|
||
userId: string; | ||
name: string; | ||
constructor(public nav: NavController, public params: NavParams) { | ||
this.userId = this.params.data.userId; | ||
this.name = this.params.data.name; | ||
} | ||
|
||
goToNextPage() { | ||
this.nav.push('ThirdPage', { paramOne: 'Hello', paramTwo: 'Its me'}); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/components/nav/test/simple-nav-default-history/pages/third-page/third-page.html
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<ion-header> | ||
<ion-navbar> | ||
<ion-title>Third Page</ion-title> | ||
</ion-navbar> | ||
</ion-header> | ||
<ion-content> | ||
<div> | ||
Param One: {{paramOne}} | ||
</div> | ||
<div> | ||
Param Two: {{paramTwo}} | ||
</div> | ||
</ion-content> |
13 changes: 13 additions & 0 deletions
13
src/components/nav/test/simple-nav-default-history/pages/third-page/third-page.module.ts
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { IonicPageModule } from '../../../../../..'; | ||
import { ThirdPage } from './third-page'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
IonicPageModule.forChild(ThirdPage) | ||
], | ||
declarations: [ | ||
ThirdPage | ||
] | ||
}) | ||
export class ThirdPageModule { } |
21 changes: 21 additions & 0 deletions
21
src/components/nav/test/simple-nav-default-history/pages/third-page/third-page.ts
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Component } from '@angular/core'; | ||
import { IonicPage, NavController, NavParams } from '../../../../../..'; | ||
|
||
@IonicPage({ | ||
segment: 'paramOne/:paramOne/paramTwo/:paramTwo', | ||
defaultHistory: [ | ||
'FirstPage' | ||
] | ||
}) | ||
@Component({ | ||
templateUrl: 'third-page.html' | ||
}) | ||
export class ThirdPage { | ||
|
||
paramOne: string; | ||
paramTwo: string; | ||
constructor(public nav: NavController, public params: NavParams) { | ||
this.paramOne = this.params.data.paramOne; | ||
this.paramTwo = this.params.data.paramTwo; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/components/nav/test/simple-nav-then-tabs-default-history/app/app.component.ts
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
template: `<ion-nav [root]="root"></ion-nav>` | ||
}) | ||
export class AppComponent { | ||
root = 'LoginPage'; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/components/nav/test/simple-nav-then-tabs-default-history/app/app.module.ts
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { IonicApp, IonicModule } from '../../../../..'; | ||
|
||
import { AppComponent } from './app.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
IonicModule.forRoot(AppComponent, { swipeBackEnabled: true, preloadModules: true }), | ||
], | ||
bootstrap: [IonicApp] | ||
}) | ||
export class AppModule {} |
5 changes: 5 additions & 0 deletions
5
src/components/nav/test/simple-nav-then-tabs-default-history/app/main.ts
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
|
||
import { AppModule } from './app.module'; | ||
|
||
platformBrowserDynamic().bootstrapModule(AppModule); |
13 changes: 13 additions & 0 deletions
13
...nents/nav/test/simple-nav-then-tabs-default-history/pages/login-page/login-page.module.ts
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { IonicPageModule } from '../../../../../..'; | ||
import { LoginPage } from './login-page'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
IonicPageModule.forChild(LoginPage) | ||
], | ||
declarations: [ | ||
LoginPage | ||
] | ||
}) | ||
export class LoginPageModule { } |
Oops, something went wrong.