FrontEndDev #4
|
@ -13,6 +13,10 @@ const routes: Routes = [
|
|||
path: 'tabs',
|
||||
loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'tabsUser',
|
||||
loadChildren: () => import('./tabs-user/tabs-user.module').then(m => m.TabsUserPageModule)
|
||||
},
|
||||
{
|
||||
path: 'view-evento',
|
||||
loadChildren: () => import('./view-evento/view-evento.module').then( m => m.ViewEventoPageModule)
|
||||
|
@ -26,6 +30,11 @@ const routes: Routes = [
|
|||
redirectTo: 'login',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'tabs-user',
|
||||
loadChildren: () => import('./tabs-user/tabs-user.module').then( m => m.TabsUserPageModule)
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ export class FeedService {
|
|||
this.apiService.getEventos()
|
||||
.subscribe(eventos => {
|
||||
this.eventos = eventos;
|
||||
|
||||
this.router.navigate(['/tabsUser'])
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
import { FullscreenOverlayContainer } from '@angular/cdk/overlay';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { TabsUserPage } from './tabs-user.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TabsUserPage,
|
||||
children: [
|
||||
{
|
||||
path: 'tab2',
|
||||
loadChildren: ()=> import('../tab2/tab2.module').then(m=>m.Tab2PageModule),
|
||||
},
|
||||
|
||||
{
|
||||
path: 'tab3',
|
||||
loadChildren: ()=> import('../tab3/tab3.module').then(m=>m.Tab3PageModule),
|
||||
},
|
||||
|
||||
{
|
||||
path:'',
|
||||
redirectTo: 'tab2',
|
||||
pathMatch: 'full'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class TabsUserPageRoutingModule {}
|
|
@ -0,0 +1,20 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { TabsUserPageRoutingModule } from './tabs-user-routing.module';
|
||||
|
||||
import { TabsUserPage } from './tabs-user.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
TabsUserPageRoutingModule
|
||||
],
|
||||
declarations: [TabsUserPage]
|
||||
})
|
||||
export class TabsUserPageModule {}
|
|
@ -0,0 +1,17 @@
|
|||
<ion-tabs>
|
||||
|
||||
<ion-tab-bar slot="bottom">
|
||||
<ion-tab-button tab="tab2">
|
||||
<ion-icon name="search-outline"></ion-icon>
|
||||
<ion-label>Feed</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button tab="tab3">
|
||||
<ion-icon name="accessibility-outline"></ion-icon>
|
||||
<ion-label>Me</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
|
||||
</ion-tab-bar>
|
||||
|
||||
</ion-tabs>
|
|
@ -0,0 +1,24 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { TabsUserPage } from './tabs-user.page';
|
||||
|
||||
describe('TabsUserPage', () => {
|
||||
let component: TabsUserPage;
|
||||
let fixture: ComponentFixture<TabsUserPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TabsUserPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TabsUserPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tabs-user',
|
||||
templateUrl: './tabs-user.page.html',
|
||||
styleUrls: ['./tabs-user.page.scss'],
|
||||
})
|
||||
export class TabsUserPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
|
@ -11,14 +11,7 @@ const routes: Routes = [
|
|||
path: 'tab1',
|
||||
loadChildren: () => import('../tab1/tab1.module').then(m => m.Tab1PageModule),
|
||||
},
|
||||
{
|
||||
path: 'tab2',
|
||||
loadChildren: () => import('../tab2/tab2.module').then(m => m.Tab2PageModule)
|
||||
},
|
||||
{
|
||||
path: 'tab3',
|
||||
loadChildren: () => import('../tab3/tab3.module').then(m => m.Tab3PageModule)
|
||||
},
|
||||
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'tab1',
|
||||
|
|
|
@ -2,19 +2,11 @@
|
|||
|
||||
<ion-tab-bar slot="bottom">
|
||||
<ion-tab-button tab="tab1">
|
||||
<ion-icon name="triangle"></ion-icon>
|
||||
<ion-label>Tab 1</ion-label>
|
||||
<ion-icon name="home-outline"></ion-icon>
|
||||
<ion-label>Perfil</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>
|
||||
|
|
Loading…
Reference in New Issue