Angular2 Query Parameter from index URL

前端 未结 2 1904
梦毁少年i
梦毁少年i 2021-01-23 07:21

I am trying to get the query params from a url in a component in Angular2

Version: \"angular2\": \"npm:angular2@2.0.0-beta.12\",

I am trying to extract id query

2条回答
  •  爱一瞬间的悲伤
    2021-01-23 07:47

    You can get the query params from the _location.path() in the AppComponent. You'd have to parse them yourself. I'm looking for the same thing, and haven't found a better solution.

    I hope someone else follows up on this.

提交回复
热议问题