📜  激活路由器角度 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:35.260000             🧑  作者: Mango

代码示例2
ngOnInit(): void {
    console.log("activated route", this.activatedRoute);
    this.activatedRoute.paramMap.subscribe(
      (params: any) => {
        console.log("in params", params);

        this.userid = params.get('id');
        console.log("in user id", this.userid);
        this.getProfile();
      }
    )