1constructor(private activatedRoute: ActivatedRoute) {
2 this.activatedRoute.queryParams.subscribe(params => {
3 let date = params['startdate'];
4 console.log(date); // Print the parameter to the console.
5 });
6}
7
1export class HeroComponent implements OnInit {
2 constructor(private _activatedRoute: ActivatedRoute, private _router:Router) {
3 _router.routerState.queryParams.subscribe(
4 params => console.log('queryParams', params['st']));