Add routing conifguration and default login page

This commit is contained in:
kusowl 2026-02-19 12:02:47 +05:30
parent 2ed7cc7b86
commit 91ab8962a0
8 changed files with 52 additions and 7 deletions

View File

@ -1,3 +1,3 @@
<app-header />
<app-products />
<router-outlet></router-outlet>
<app-footer />

View File

@ -1,3 +1,14 @@
import { Routes } from '@angular/router';
import { Login } from './features/login/login';
import { Home } from './features/home/home';
export const routes: Routes = [];
export const routes: Routes = [
{
path: '',
component: Home,
},
{
path: 'login',
component: Login,
},
];

View File

@ -1 +1 @@
<p>home works!</p>
<app-products />

View File

@ -1,11 +1,10 @@
import { Component } from '@angular/core';
import { Products } from './products/products';
@Component({
selector: 'app-home',
imports: [],
imports: [Products],
templateUrl: './home.html',
styleUrl: './home.css',
})
export class Home {
}
export class Home {}

View File

View File

@ -0,0 +1 @@
<p>login works!</p>

View File

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Login } from './login';
describe('Login', () => {
let component: Login;
let fixture: ComponentFixture<Login>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [Login]
})
.compileComponents();
fixture = TestBed.createComponent(Login);
component = fixture.componentInstance;
await fixture.whenStable();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-login',
imports: [],
templateUrl: './login.html',
styleUrl: './login.css',
})
export class Login {
}