23 lines
582 B
TypeScript
23 lines
582 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import {ActivatedRoute, ParamMap} from '@angular/router';
|
|
|
|
@Component({
|
|
selector: 'app-home',
|
|
templateUrl: './home.component.html',
|
|
styleUrls: ['./home.component.css']
|
|
})
|
|
export class HomeComponent implements OnInit {
|
|
|
|
constructor(private route: ActivatedRoute) { }
|
|
|
|
ngOnInit() {
|
|
console.log('homecomponent onInit')
|
|
// fix up the language, fetch it from the route!
|
|
this.route.parent.paramMap.subscribe((params: ParamMap) => {
|
|
console.log(params);
|
|
console.log(params.get('language'));
|
|
});
|
|
}
|
|
|
|
}
|