import { ActivatedRoute, Router} from '@angular/router';
..
constructor(private route : ActivatedRoute, private router : Router){}
ngOnInit() {
this.route.paramMap.subscribe(params => {
let id1 = params.get('id1');
let id2 = params.get('id2');
});
}