How do I get the absolute path of the current page in Angular 2?

后端 未结 5 2044
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 06:34

I\'ve essentially run into this problem, where I need a reference to the current route to use gradients, but have yet to figure out how to translate the solution into Angula

5条回答
  •  不知归路
    2020-11-30 07:13

    if you reload page , you can not get route path by Router or ActivatedRoute . You should use window.location.pathname

提交回复
热议问题