Skip to content

Commit 2db9692

Browse files
committed
added components and starting implementing login and register component
1 parent c2626fb commit 2db9692

20 files changed

+713
-339
lines changed

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@angular/router": "^17.3.0",
2323
"@angular/ssr": "^17.3.4",
2424
"express": "^4.18.2",
25+
"ngx-cookie-service": "^17.0.0",
2526
"rxjs": "~7.8.0",
2627
"tslib": "^2.3.0",
2728
"zone.js": "~0.14.3"
@@ -41,4 +42,4 @@
4142
"karma-jasmine-html-reporter": "~2.1.0",
4243
"typescript": "~5.4.2"
4344
}
44-
}
45+
}

src/app/app.component.html

Lines changed: 1 addition & 336 deletions
Large diffs are not rendered by default.

src/app/app.routes.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1-
import { Routes } from '@angular/router';
1+
import {Routes} from '@angular/router';
2+
import {LoginComponent} from "./pages/login/login.component";
3+
import {LayoutComponent} from "./pages/layout/layout.component";
4+
import {DashboardComponent} from "./pages/dashboard/dashboard.component";
5+
import {RegisterComponent} from "./pages/register/register.component";
26

3-
export const routes: Routes = [];
7+
export const routes: Routes = [
8+
{path: 'login', component: LoginComponent},
9+
{path: 'register', component: RegisterComponent},
10+
{path: '', redirectTo: '/login', pathMatch: 'full'},
11+
{
12+
path: '', component: LayoutComponent,
13+
children: [
14+
{
15+
path: 'dashboard',
16+
component: DashboardComponent
17+
}
18+
]
19+
},
20+
];

src/app/pages/dashboard/dashboard.component.css

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>dashboard works!</p>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { DashboardComponent } from './dashboard.component';
4+
5+
describe('DashboardComponent', () => {
6+
let component: DashboardComponent;
7+
let fixture: ComponentFixture<DashboardComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [DashboardComponent]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(DashboardComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-dashboard',
5+
standalone: true,
6+
imports: [],
7+
templateUrl: './dashboard.component.html',
8+
styleUrl: './dashboard.component.css'
9+
})
10+
export class DashboardComponent {
11+
12+
}

src/app/pages/layout/layout.component.css

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>layout works!</p>

0 commit comments

Comments
 (0)