Skip to content

Commit

Permalink
feat: home components
Browse files Browse the repository at this point in the history
  • Loading branch information
aldo-maciel committed May 14, 2020
1 parent 0dc16b1 commit 29719ad
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/app/home/home-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HttpClientModule } from '@angular/common/http';
import { HomePage } from '@/app/home/home.page';

const routes: Routes = [
{
path: '',
component: HomePage
}
];

@NgModule({
imports: [HttpClientModule, RouterModule.forChild(routes)],
exports: [RouterModule],
providers: [HttpClientModule]
})
export class HomePageRoutingModule {
}
20 changes: 20 additions & 0 deletions src/app/home/home.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { IonicModule } from '@ionic/angular';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { HomePageRoutingModule } from '@/app/home/home-routing.module';
import { HomePage } from '@/app/home/home.page';
import { PostsPageModule } from '@/app/posts/posts.module';

@NgModule({
imports: [
IonicModule,
CommonModule,
FormsModule,
HomePageRoutingModule,
PostsPageModule
],
declarations: [ HomePage ]
})
export class HomePageModule {
}
1 change: 1 addition & 0 deletions src/app/home/home.page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<ion-nav [root]="rootPage"></ion-nav>
10 changes: 10 additions & 0 deletions src/app/home/home.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';
import { PostsPage } from '@/app/posts/posts.page';

@Component({
selector: 'app-home',
templateUrl: 'home.page.html'
})
export class HomePage {
public rootPage: any = PostsPage;
}

0 comments on commit 29719ad

Please sign in to comment.