-
Notifications
You must be signed in to change notification settings - Fork 0
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
bravemaster619
committed
Apr 25, 2020
1 parent
5ebf624
commit 540a943
Showing
7 changed files
with
111 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { NgModule } from '@angular/core' | ||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router' | ||
import { NgModule } from "@angular/core"; | ||
import { PreloadAllModules, RouterModule, Routes } from "@angular/router"; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
path: "", | ||
loadChildren: () => | ||
import('./tabs/tabs.module').then((m) => m.TabsPageModule), | ||
}, | ||
] | ||
import("./pages/home/home.module").then((m) => m.HomePageModule) | ||
} | ||
]; | ||
@NgModule({ | ||
imports: [ | ||
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }), | ||
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) | ||
], | ||
exports: [RouterModule], | ||
exports: [RouterModule] | ||
}) | ||
export class AppRoutingModule {} |
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 { Routes, RouterModule } from "@angular/router"; | ||
|
||
import { HomePage } from "./home.page"; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: "", | ||
component: HomePage | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class HomePageRoutingModule {} |
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,22 @@ | ||
import { NgModule } from "@angular/core"; | ||
import { CommonModule } from "@angular/common"; | ||
import { FormsModule } from "@angular/forms"; | ||
|
||
import { IonicModule } from "@ionic/angular"; | ||
|
||
import { HomePageRoutingModule } from "./home-routing.module"; | ||
|
||
import { HomePage } from "./home.page"; | ||
import { TranslateModule } from "@ngx-translate/core"; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
FormsModule, | ||
IonicModule, | ||
HomePageRoutingModule, | ||
TranslateModule.forChild() | ||
], | ||
declarations: [HomePage] | ||
}) | ||
export class HomePageModule {} |
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,20 @@ | ||
<ion-tabs> | ||
|
||
<ion-tab-bar slot="bottom"> | ||
<ion-tab-button tab="tab1"> | ||
<ion-icon name="triangle"></ion-icon> | ||
<ion-label translate="Home"></ion-label> | ||
</ion-tab-button> | ||
|
||
<ion-tab-button tab="tab2"> | ||
<ion-icon name="ellipse"></ion-icon> | ||
<ion-label>Tab 2</ion-label> | ||
</ion-tab-button> | ||
|
||
<ion-tab-button tab="tab3"> | ||
<ion-icon name="square"></ion-icon> | ||
<ion-label>Tab 3</ion-label> | ||
</ion-tab-button> | ||
</ion-tab-bar> | ||
|
||
</ion-tabs> |
Empty file.
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,32 @@ | ||
import { async, ComponentFixture, TestBed } from "@angular/core/testing"; | ||
import { IonicModule } from "@ionic/angular"; | ||
|
||
import { HomePage } from "./home.page"; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { HttpClientModule } from '@angular/common/http'; | ||
|
||
describe("HomePage", () => { | ||
let component: HomePage; | ||
let fixture: ComponentFixture<HomePage>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [HomePage], | ||
imports: [ | ||
HttpClientModule, | ||
IonicModule.forRoot(), | ||
TranslateModule.forRoot(), | ||
RouterModule.forRoot([]) | ||
] | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(HomePage); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
})); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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,12 @@ | ||
import { Component, OnInit } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: "app-home", | ||
templateUrl: "./home.page.html", | ||
styleUrls: ["./home.page.scss"] | ||
}) | ||
export class HomePage implements OnInit { | ||
constructor() {} | ||
|
||
ngOnInit() {} | ||
} |