code-tofu / project_Pokemart

0 stars 0 forks source link

Activated Route Error due to different url segment array sizes #9

Closed code-tofu closed 1 year ago

code-tofu commented 1 year ago

Accessing the param of the route clashes due to array size of URL segment varies with each page:

this.actRoute.snapshot.url[urllen-1].path == 'shop' //urllen1 
this.actRoute.snapshot.url[urllen - 2].path == 'category' //urllen 3
this.actRoute.snapshot.url[urllen - 1].path == 'search' //urllen2
code-tofu commented 1 year ago

Used routeconfig as source of url info:

this.actRoute.snapshot.routeConfig!.path == 'shop/category/:category'
this.actRoute.snapshot.routeConfig!.path == 'shop/search'