Angular2 with matrix url notation

后端 未结 3 1072
一个人的身影
一个人的身影 2020-12-13 18:39

Is the matrix url notation the \"default\" to creating urls with parameters or is better to use the \"old\" notation with ? and &. I didn\'t understand it on the angular

3条回答
  •  北海茫月
    2020-12-13 19:31

    For matrix parameters you can also subscribe to params instead of peeling them out of url.

    this.paramSubscription = this.activeRoute.params.subscribe(params => {
      const bar = params['bar'];
      const baz = params['baz'];
    });
    

提交回复
热议问题