added components
This commit is contained in:
parent
aa035ac60d
commit
dfd1d8fd1c
15 changed files with 122 additions and 2 deletions
|
|
@ -3,10 +3,16 @@ import { SummaryComponent } from './components/summary/summary.component';
|
||||||
import { HelpComponent } from './shared/components/help/help.component';
|
import { HelpComponent } from './shared/components/help/help.component';
|
||||||
import { ImprintComponent } from './shared/components/imprint/imprint.component';
|
import { ImprintComponent } from './shared/components/imprint/imprint.component';
|
||||||
import { PrivacyPolicyComponent } from './shared/components/privacy-policy/privacy-policy.component';
|
import { PrivacyPolicyComponent } from './shared/components/privacy-policy/privacy-policy.component';
|
||||||
|
import { AddTaskComponent } from './components/add-task/add-task.component';
|
||||||
|
import { BoardComponent } from './components/board/board.component';
|
||||||
|
import { ContactsComponent } from './components/contacts/contacts.component';
|
||||||
|
|
||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
{ path: '', component: SummaryComponent },
|
{ path: '', component: SummaryComponent },
|
||||||
{ path: 'summary', component: SummaryComponent },
|
{ path: 'summary', component: SummaryComponent },
|
||||||
|
{ path: 'add-task', component: AddTaskComponent },
|
||||||
|
{ path: 'board', component: BoardComponent },
|
||||||
|
{ path: 'contacts', component: ContactsComponent },
|
||||||
{ path: 'help', component: HelpComponent },
|
{ path: 'help', component: HelpComponent },
|
||||||
{ path: 'imprint', component: ImprintComponent },
|
{ path: 'imprint', component: ImprintComponent },
|
||||||
{ path: 'privacy-policy', component: PrivacyPolicyComponent },
|
{ path: 'privacy-policy', component: PrivacyPolicyComponent },
|
||||||
|
|
|
||||||
1
src/app/components/add-task/add-task.component.html
Normal file
1
src/app/components/add-task/add-task.component.html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<p>add-task works!</p>
|
||||||
0
src/app/components/add-task/add-task.component.scss
Normal file
0
src/app/components/add-task/add-task.component.scss
Normal file
23
src/app/components/add-task/add-task.component.spec.ts
Normal file
23
src/app/components/add-task/add-task.component.spec.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { AddTaskComponent } from './add-task.component';
|
||||||
|
|
||||||
|
describe('AddTaskComponent', () => {
|
||||||
|
let component: AddTaskComponent;
|
||||||
|
let fixture: ComponentFixture<AddTaskComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [AddTaskComponent]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(AddTaskComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
12
src/app/components/add-task/add-task.component.ts
Normal file
12
src/app/components/add-task/add-task.component.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-add-task',
|
||||||
|
standalone: true,
|
||||||
|
imports: [],
|
||||||
|
templateUrl: './add-task.component.html',
|
||||||
|
styleUrl: './add-task.component.scss'
|
||||||
|
})
|
||||||
|
export class AddTaskComponent {
|
||||||
|
|
||||||
|
}
|
||||||
1
src/app/components/board/board.component.html
Normal file
1
src/app/components/board/board.component.html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<p>board works!</p>
|
||||||
0
src/app/components/board/board.component.scss
Normal file
0
src/app/components/board/board.component.scss
Normal file
23
src/app/components/board/board.component.spec.ts
Normal file
23
src/app/components/board/board.component.spec.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { BoardComponent } from './board.component';
|
||||||
|
|
||||||
|
describe('BoardComponent', () => {
|
||||||
|
let component: BoardComponent;
|
||||||
|
let fixture: ComponentFixture<BoardComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [BoardComponent]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(BoardComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
12
src/app/components/board/board.component.ts
Normal file
12
src/app/components/board/board.component.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-board',
|
||||||
|
standalone: true,
|
||||||
|
imports: [],
|
||||||
|
templateUrl: './board.component.html',
|
||||||
|
styleUrl: './board.component.scss'
|
||||||
|
})
|
||||||
|
export class BoardComponent {
|
||||||
|
|
||||||
|
}
|
||||||
1
src/app/components/contacts/contacts.component.html
Normal file
1
src/app/components/contacts/contacts.component.html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<p>contacts works!</p>
|
||||||
0
src/app/components/contacts/contacts.component.scss
Normal file
0
src/app/components/contacts/contacts.component.scss
Normal file
23
src/app/components/contacts/contacts.component.spec.ts
Normal file
23
src/app/components/contacts/contacts.component.spec.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ContactsComponent } from './contacts.component';
|
||||||
|
|
||||||
|
describe('ContactsComponent', () => {
|
||||||
|
let component: ContactsComponent;
|
||||||
|
let fixture: ComponentFixture<ContactsComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [ContactsComponent]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(ContactsComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
12
src/app/components/contacts/contacts.component.ts
Normal file
12
src/app/components/contacts/contacts.component.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-contacts',
|
||||||
|
standalone: true,
|
||||||
|
imports: [],
|
||||||
|
templateUrl: './contacts.component.html',
|
||||||
|
styleUrl: './contacts.component.scss'
|
||||||
|
})
|
||||||
|
export class ContactsComponent {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -17,8 +17,9 @@
|
||||||
<div
|
<div
|
||||||
id="navLinkAddTask"
|
id="navLinkAddTask"
|
||||||
class="nav-links-inner"
|
class="nav-links-inner"
|
||||||
|
routerLink="add-task"
|
||||||
[ngClass]="{
|
[ngClass]="{
|
||||||
active: currentPath == 'addtask'
|
active: currentPath == 'add-task'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<img src="./assets/img/sidebar/add-task.svg" alt="addtask" /><span
|
<img src="./assets/img/sidebar/add-task.svg" alt="addtask" /><span
|
||||||
|
|
@ -28,6 +29,7 @@
|
||||||
<div
|
<div
|
||||||
id="navLinkBoard"
|
id="navLinkBoard"
|
||||||
class="nav-links-inner"
|
class="nav-links-inner"
|
||||||
|
routerLink="board"
|
||||||
[ngClass]="{
|
[ngClass]="{
|
||||||
active: currentPath == 'board'
|
active: currentPath == 'board'
|
||||||
}"
|
}"
|
||||||
|
|
@ -37,6 +39,7 @@
|
||||||
<div
|
<div
|
||||||
id="navLinkContacts"
|
id="navLinkContacts"
|
||||||
class="nav-links-inner"
|
class="nav-links-inner"
|
||||||
|
routerLink="contacts"
|
||||||
[ngClass]="{
|
[ngClass]="{
|
||||||
active: currentPath == 'contacts'
|
active: currentPath == 'contacts'
|
||||||
}"
|
}"
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,13 @@ export class SidebarComponent {
|
||||||
constructor(private router: Router) {}
|
constructor(private router: Router) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.getCurrentPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
getCurrentPath() {
|
||||||
this.router.events.subscribe((event) => {
|
this.router.events.subscribe((event) => {
|
||||||
if (event instanceof NavigationEnd) {
|
if (event instanceof NavigationEnd) {
|
||||||
this.currentPath = this.router.url.substring(1);
|
this.currentPath = this.router.url.substring(1);
|
||||||
console.log(this.currentPath);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue