mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
test(tabs): static angular tabs
This commit is contained in:
@ -22,10 +22,11 @@ const routes: Routes = [
|
||||
|
||||
{ path: 'no-routing-nav', loadChildren: 'app/no-routing-nav/no-routing-nav.module#NoRoutingNavModule' },
|
||||
{ path: 'simple-nav', loadChildren: 'app/simple-nav/simple-nav.module#SimpleNavModule' },
|
||||
{ path: 'static-tabs', loadChildren: 'app/static-tabs/tabs.module#TabsModule' },
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
imports: [RouterModule.forRoot(routes, { enableTracing: true })],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
|
||||
<h1>
|
||||
@ionic/angular tests
|
||||
</h1>
|
||||
<h1>@ionic/angular tests</h1>
|
||||
|
||||
<h3>Overlays</h3>
|
||||
<ul>
|
||||
@ -46,10 +44,13 @@
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='no-routing-nav'>No Routing</a>
|
||||
<a href="no-routing-nav">No Routing</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='simple-nav/page-one'>Simple Nav</a>
|
||||
<a href="simple-nav/page-one">Simple Nav</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="static-tabs">Static Tabs</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
19
angular/test/nav/src/app/static-tabs/tabs-routing.module.ts
Normal file
19
angular/test/nav/src/app/static-tabs/tabs-routing.module.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
import { TabsPageComponent } from './tabs.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TabsPageComponent,
|
||||
children: []
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes), IonicModule],
|
||||
exports: [RouterModule, IonicModule]
|
||||
})
|
||||
export class TabsRoutingModule { }
|
||||
46
angular/test/nav/src/app/static-tabs/tabs.component.ts
Executable file
46
angular/test/nav/src/app/static-tabs/tabs.component.ts
Executable file
@ -0,0 +1,46 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-nav-page',
|
||||
template: `
|
||||
<ion-app>
|
||||
<ion-tabs>
|
||||
|
||||
<ion-tab title="Tab 1" icon="star">
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Tab 1</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content padding>
|
||||
Tab 1 Static Content
|
||||
</ion-content>
|
||||
</ion-tab>
|
||||
|
||||
<ion-tab title="Tab 2" icon="heart">
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Tab 2</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content padding>
|
||||
Tab 2 Static Content
|
||||
</ion-content>
|
||||
</ion-tab>
|
||||
|
||||
<ion-tab title="Tab 3" icon="home">
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Tab 3</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content padding>
|
||||
Tab 3 Static Content
|
||||
</ion-content>
|
||||
</ion-tab>
|
||||
|
||||
</ion-tabs>
|
||||
</ion-app>
|
||||
`
|
||||
})
|
||||
export class TabsPageComponent {}
|
||||
19
angular/test/nav/src/app/static-tabs/tabs.module.ts
Executable file
19
angular/test/nav/src/app/static-tabs/tabs.module.ts
Executable file
@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
import { TabsPageComponent } from './tabs.component';
|
||||
import { TabsRoutingModule } from './tabs-routing.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
TabsPageComponent,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
IonicModule,
|
||||
TabsRoutingModule
|
||||
]
|
||||
})
|
||||
export class TabsModule {}
|
||||
Reference in New Issue
Block a user