Similar URLs set active together
MarlonEtiene opened this issue · comments
Hello again!
I used answer #217 and it worked fine, but I have very similar url's like account
and account-type
.
When I click on the menu item that the href is account
, only that item is set as active, however, if I click on the item that the href is account-type
, both items are seted as active.
I tried a few ways to not set both as active, but in all I was not successful.
I know this is not a component problem, probably a javascript failure of mine, however, could you help me please?
Anyway, thanks and sorry for my bad english
Add /
at the end:
this.$page.url.startsWith(this.item.href+'/')
@yaminncco you are a genius!
Worked like a charm!
Thank you so much!