Angular 2 - How to pass URL parameters?

后端 未结 2 1362
半阙折子戏
半阙折子戏 2020-11-28 07:27

I have created a single page mortgage calculator application in Angular 2, which acts like a learning playground for me (trying to get more accustomed to technology stack cu

2条回答
  •  感动是毒
    2020-11-28 08:25

    It seems you are dealing with Queryparams . So to access them, you can try below code,

    this.var1= this.route
          .queryParams
          .map(params => params['var1']);
    

提交回复
热议问题