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
if you reload page , you can not get route path by Router or ActivatedRoute . You should use window.location.pathname
window.location.pathname