📜  获取路由查询参数 Angular - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:05.779000             🧑  作者: Mango

代码示例2
export class HeroComponent implements OnInit {
  constructor(private _activatedRoute: ActivatedRoute, private _router:Router) {
    _router.routerState.queryParams.subscribe(
      params => console.log('queryParams', params['st']));