diff --git a/projects/project-3/frontend/src/app/app-routing.module.ts b/projects/project-3/frontend/src/app/app-routing.module.ts index d425c6f..734af2b 100644 --- a/projects/project-3/frontend/src/app/app-routing.module.ts +++ b/projects/project-3/frontend/src/app/app-routing.module.ts @@ -1,10 +1,17 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import {NgModule} from '@angular/core'; +import {RouterModule, Routes} from '@angular/router'; +import {MapComponent} from './map/map.component'; +import {DashboardComponent} from './dashboard/dashboard.component'; -const routes: Routes = []; +const routes: Routes = [ + {path: '', redirectTo: 'map', pathMatch: 'full'}, + {path: 'map', component: MapComponent}, + {path: 'dashboard/:id', component: DashboardComponent} +]; @NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule] }) -export class AppRoutingModule { } +export class AppRoutingModule { +} diff --git a/projects/project-3/frontend/src/app/map/popup/popup.component.html b/projects/project-3/frontend/src/app/map/popup/popup.component.html deleted file mode 100644 index ad61498..0000000 --- a/projects/project-3/frontend/src/app/map/popup/popup.component.html +++ /dev/null @@ -1 +0,0 @@ -{{station.commonName}} diff --git a/projects/project-3/frontend/src/app/map/popup/popup.component.scss b/projects/project-3/frontend/src/app/map/popup/popup.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/projects/project-3/frontend/src/app/map/popup/popup.component.spec.ts b/projects/project-3/frontend/src/app/map/popup/popup.component.spec.ts deleted file mode 100644 index fb8e171..0000000 --- a/projects/project-3/frontend/src/app/map/popup/popup.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PopupComponent } from './popup.component'; - -describe('PopupComponent', () => { - let component: PopupComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ PopupComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PopupComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/projects/project-3/frontend/src/app/map/popup/popup.component.ts b/projects/project-3/frontend/src/app/map/popup/popup.component.ts deleted file mode 100644 index e3f3a97..0000000 --- a/projects/project-3/frontend/src/app/map/popup/popup.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {Component, OnInit} from '@angular/core'; -import {BikeStation, IBikeStation} from '../../service/domain/bike-station'; - -@Component({ - selector: 'app-popup', - templateUrl: './popup.component.html', - styleUrls: ['./popup.component.scss'] -}) -export class PopupComponent implements OnInit { - station: IBikeStation; - - constructor() { - } - - ngOnInit(): void { - } - - public bindStation(bikeStation: IBikeStation): void { - this.station = bikeStation; - console.log(this.station); - } - -}