chore(): sync with main

This commit is contained in:
Liam DeBeasi
2022-09-16 15:24:24 -04:00
759 changed files with 13280 additions and 7837 deletions

View File

@ -55,6 +55,10 @@ const routes: Routes = [
path: 'tabs',
loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
},
{
path: 'tabs-global',
loadChildren: () => import('./tabs-global/tabs-global.module').then(m => m.TabsGlobalModule)
},
{
path: 'nested-outlet',
component: NestedOutletComponent,
@ -68,7 +72,7 @@ const routes: Routes = [
component: NestedOutletPage2Component
}
]
}
},
];
@NgModule({

View File

@ -0,0 +1,16 @@
import { NgModule } from "@angular/core";
import { RouterModule } from "@angular/router";
import { TabsGlobalComponent } from "./tabs-global.component";
@NgModule({
imports: [
RouterModule.forChild([
{
path: '',
component: TabsGlobalComponent
}
])
],
exports: [RouterModule]
})
export class TabsGlobalRoutingModule { }

View File

@ -0,0 +1,17 @@
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button></ion-back-button>
</ion-buttons>
<ion-title>
Global Page
</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-content>
<ion-button id="goto-prev-pop" (click)="navCtrl.pop()">Go To Previous</ion-button>
</ion-content>
</ion-content>

View File

@ -0,0 +1,17 @@
import { Component } from "@angular/core";
import { NavController } from "@ionic/angular";
/**
* This component is used in conjunction with a tabs router-outlet,
* to validate the behavior of different routing APIs (e.g. NavController)
* when leaving and re-entering a router-outlet.
*/
@Component({
selector: 'app-tabs-global',
templateUrl: 'tabs-global.component.html'
})
export class TabsGlobalComponent {
constructor(public navCtrl: NavController) { }
}

View File

@ -0,0 +1,13 @@
import { NgModule } from "@angular/core";
import { IonicModule } from "@ionic/angular";
import { TabsGlobalRoutingModule } from "./tabs-global-routing.module";
import { TabsGlobalComponent } from "./tabs-global.component";
@NgModule({
imports: [
IonicModule,
TabsGlobalRoutingModule
],
declarations: [TabsGlobalComponent]
})
export class TabsGlobalModule { }

View File

@ -12,6 +12,9 @@
<p>
<ion-button routerLink="/tabs/account" id="goto-tab1-page1">Go to Tab 1 - Page 1</ion-button>
<ion-button routerLink="/tabs/contact" id="goto-tab2-page1">Go to Tab 2 - Page 1</ion-button>
<ion-button routerLink="/tabs-global" id="goto-global">Go to Global Page</ion-button>
<ion-button routerLink="/tabs-global" id="goto-prev" (click)="navCtrl.pop()">Go to Previous Page (NavController).
</ion-button>
<ion-button routerLink="/tabs/account/nested/{{next()}}" id="goto-next">Go to Next</ion-button>
</p>
</ion-content>

View File

@ -1,5 +1,6 @@
import { ActivatedRoute } from '@angular/router';
import { Component, OnInit } from '@angular/core';
import { NavController } from '@ionic/angular';
@Component({
selector: 'app-tabs-tab1-nested',
@ -9,7 +10,8 @@ export class TabsTab1NestedComponent implements OnInit {
id = '';
constructor(
private route: ActivatedRoute,
) {}
public navCtrl: NavController
) { }
ngOnInit() {
this.id = this.route.snapshot.paramMap.get('id');
@ -18,4 +20,5 @@ export class TabsTab1NestedComponent implements OnInit {
next() {
return parseInt(this.id, 10) + 1;
}
}

View File

@ -19,5 +19,6 @@
id="goto-nested-page1-with-query-params">Go to Page 2 with Query Params</ion-button>
<ion-button routerLink="/tabs/lazy/nested" id="goto-tab3-page2">Go to Tab 3 - Page 2</ion-button>
<ion-button routerLink="/nested-outlet/page" id="goto-nested-page1">Go to nested</ion-button>
<ion-button (click)="navCtrl.pop()" id="goto-previous-page">Go to Previous Page</ion-button>
</p>
</ion-content>

View File

@ -1,4 +1,5 @@
import { Component, NgZone } from '@angular/core';
import { NavController } from '@ionic/angular';
@Component({
selector: 'app-tabs-tab1',
@ -9,6 +10,8 @@ export class TabsTab1Component {
segment = 'one';
changed = 'false';
constructor(public navCtrl: NavController) {}
ionViewWillEnter() {
NgZone.assertInAngularZone();
setTimeout(() => {