setup usersa
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { TabsPage } from './tabs.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: 'tabs',
|
||||
component: TabsPage,
|
||||
children: [
|
||||
{
|
||||
path: 'history',
|
||||
loadChildren: () => import('../history/history.module').then(m => m.HistoryPageModule)
|
||||
},
|
||||
{
|
||||
path: 'allowance',
|
||||
loadChildren: () => import('../allowance/allowance.module').then(m => m.AllowancePageModule)
|
||||
},
|
||||
{
|
||||
path: 'tasks',
|
||||
loadChildren: () => import('../tasks/tasks.module').then(m => m.TasksPageModule)
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
redirectTo: '/tabs/allowance',
|
||||
pathMatch: 'full'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
redirectTo: '/tabs/allowance',
|
||||
pathMatch: 'full'
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes),],
|
||||
})
|
||||
export class TabsPageRoutingModule {}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
|
||||
import { TabsPageRoutingModule } from './tabs-routing.module';
|
||||
|
||||
import { TabsPage } from './tabs.page';
|
||||
import { provideHttpClient } from '@angular/common/http';
|
||||
import { UserService } from 'src/app/services/user.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
IonicModule,
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
TabsPageRoutingModule,
|
||||
MatIconModule,
|
||||
],
|
||||
declarations: [TabsPage],
|
||||
providers: [
|
||||
provideHttpClient(),
|
||||
UserService
|
||||
]
|
||||
})
|
||||
export class TabsPageModule {}
|
||||
@@ -0,0 +1,13 @@
|
||||
<ion-tabs>
|
||||
<ion-tab-bar slot="bottom">
|
||||
<ion-tab-button tab="history" href="/tabs/history">
|
||||
<mat-icon>history</mat-icon>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button tab="allowance" href="/tabs/allowance">
|
||||
<mat-icon>savings</mat-icon>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button tab="tasks" href="/tabs/tasks">
|
||||
<mat-icon>task_alt</mat-icon>
|
||||
</ion-tab-button>
|
||||
</ion-tab-bar>
|
||||
</ion-tabs>
|
||||
@@ -0,0 +1,3 @@
|
||||
.tab-selected {
|
||||
background-color: var(--ion-color-secondary);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TabsPage } from './tabs.page';
|
||||
|
||||
describe('TabsPage', () => {
|
||||
let component: TabsPage;
|
||||
let fixture: ComponentFixture<TabsPage>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [TabsPage],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TabsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tabs',
|
||||
templateUrl: 'tabs.page.html',
|
||||
styleUrls: ['tabs.page.scss'],
|
||||
standalone: false,
|
||||
})
|
||||
export class TabsPage {
|
||||
constructor() {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user