diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 26dadb8..8f19dcc 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,5 +1,4 @@ import { Routes } from "@angular/router"; -import { Login } from "./features/login/login"; import { Home } from "./features/home/home"; export const routes: Routes = [ @@ -8,7 +7,7 @@ export const routes: Routes = [ component: Home, }, { - path: "login", - component: Login, + path: "", + loadChildren: () => import('./features/auth/auth.routes').then(routes => routes.AuthRoutes) }, ]; diff --git a/src/app/features/auth/auth.routes.ts b/src/app/features/auth/auth.routes.ts new file mode 100644 index 0000000..878332d --- /dev/null +++ b/src/app/features/auth/auth.routes.ts @@ -0,0 +1,18 @@ +import { Routes } from "@angular/router"; +import { Login } from "./components/login/login"; +import { Register } from "./components/register/register"; + +export const AuthRoutes: Routes = [ + { + path: '', + children: [ + { + path: 'login', component: Login, + } + , + { + path: "register", component: Register + } + ] + } +]; diff --git a/src/app/features/login/login.css b/src/app/features/auth/components/login/login.css similarity index 100% rename from src/app/features/login/login.css rename to src/app/features/auth/components/login/login.css diff --git a/src/app/features/login/login.html b/src/app/features/auth/components/login/login.html similarity index 89% rename from src/app/features/login/login.html rename to src/app/features/auth/components/login/login.html index f8f4257..49d79f3 100644 --- a/src/app/features/login/login.html +++ b/src/app/features/auth/components/login/login.html @@ -27,6 +27,9 @@ + New User ? Sign Up diff --git a/src/app/features/login/login.spec.ts b/src/app/features/auth/components/login/login.spec.ts similarity index 100% rename from src/app/features/login/login.spec.ts rename to src/app/features/auth/components/login/login.spec.ts diff --git a/src/app/features/login/login.ts b/src/app/features/auth/components/login/login.ts similarity index 100% rename from src/app/features/login/login.ts rename to src/app/features/auth/components/login/login.ts diff --git a/src/app/features/auth/components/register/register.css b/src/app/features/auth/components/register/register.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/features/auth/components/register/register.html b/src/app/features/auth/components/register/register.html new file mode 100644 index 0000000..6b0ba2e --- /dev/null +++ b/src/app/features/auth/components/register/register.html @@ -0,0 +1 @@ +

register works!

diff --git a/src/app/features/auth/components/register/register.spec.ts b/src/app/features/auth/components/register/register.spec.ts new file mode 100644 index 0000000..d5c2d6e --- /dev/null +++ b/src/app/features/auth/components/register/register.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { Register } from './register'; + +describe('Register', () => { + let component: Register; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [Register] + }) + .compileComponents(); + + fixture = TestBed.createComponent(Register); + component = fixture.componentInstance; + await fixture.whenStable(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/auth/components/register/register.ts b/src/app/features/auth/components/register/register.ts new file mode 100644 index 0000000..af6d32b --- /dev/null +++ b/src/app/features/auth/components/register/register.ts @@ -0,0 +1,11 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-register', + imports: [], + templateUrl: './register.html', + styleUrl: './register.css', +}) +export class Register { + +}