Add routing conifguration and default login page
This commit is contained in:
parent
2ed7cc7b86
commit
91ab8962a0
@ -1,3 +1,3 @@
|
|||||||
<app-header />
|
<app-header />
|
||||||
<app-products />
|
<router-outlet></router-outlet>
|
||||||
<app-footer />
|
<app-footer />
|
||||||
|
|||||||
@ -1,3 +1,14 @@
|
|||||||
import { Routes } from '@angular/router';
|
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,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
<p>home works!</p>
|
<app-products />
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
import { Products } from './products/products';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-home',
|
selector: 'app-home',
|
||||||
imports: [],
|
imports: [Products],
|
||||||
templateUrl: './home.html',
|
templateUrl: './home.html',
|
||||||
styleUrl: './home.css',
|
styleUrl: './home.css',
|
||||||
})
|
})
|
||||||
export class Home {
|
export class Home {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
0
src/app/features/login/login.css
Normal file
0
src/app/features/login/login.css
Normal file
1
src/app/features/login/login.html
Normal file
1
src/app/features/login/login.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>login works!</p>
|
||||||
23
src/app/features/login/login.spec.ts
Normal file
23
src/app/features/login/login.spec.ts
Normal 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();
|
||||||
|
});
|
||||||
|
});
|
||||||
11
src/app/features/login/login.ts
Normal file
11
src/app/features/login/login.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-login',
|
||||||
|
imports: [],
|
||||||
|
templateUrl: './login.html',
|
||||||
|
styleUrl: './login.css',
|
||||||
|
})
|
||||||
|
export class Login {
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user