add routing to project
This commit is contained in:
parent
95baf1f9b7
commit
ba0f7b5e86
@ -1,10 +1,17 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
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 {
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
<b>{{station.commonName}}</b>
|
@ -1,25 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PopupComponent } from './popup.component';
|
||||
|
||||
describe('PopupComponent', () => {
|
||||
let component: PopupComponent;
|
||||
let fixture: ComponentFixture<PopupComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PopupComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PopupComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user