27 lines
677 B
TypeScript
27 lines
677 B
TypeScript
import {Component, OnInit} from '@angular/core';
|
|
import {ActivatedRoute} from '@angular/router';
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
styleUrls: ['./app.component.scss']
|
|
})
|
|
export class AppComponent implements OnInit {
|
|
title = 'koersepublicfrontend';
|
|
|
|
private idChampionship: number;
|
|
|
|
constructor(private route: ActivatedRoute) {
|
|
}
|
|
|
|
ngOnInit(): void {
|
|
// listen to the path ... what's the championship we're at?
|
|
this.route.paramMap.subscribe(val => {
|
|
this.idChampionship = +val.get('idchampionship');
|
|
console.log('APP CHAMP');
|
|
console.log(val);
|
|
console.log(this.idChampionship);
|
|
});
|
|
}
|
|
}
|