Open menu tree based on selected route
Posted: 09 Nov 2017, 22:00
Hi there!
I have the following menu tree.
label: 'Inbox', icon: 'fa fa-fw fa-phone',
items: [
{ label: 'All Incoming', icon: 'im-icon im-icon-phone-incoming', badge: this.callTotals.inboundAll, routerLink: ['/calls/all'] },
{ label: 'Answered', icon: 'im-icon im-icon-call-in', badge: this.callTotals.answered, routerLink: ['/calls/ans'] },
{ label: 'Missed', icon: 'im-icon im-icon-call-missed', badge: this.callTotals.missed, routerLink: ['/calls/miss'] },
If a user deep links to to the "/calls/ans" route, is it possible to have the menu automatically reflect this route on start?
I can probably write some code to crawl the menu tree and set active on a match, but I was just wondering if I was missing something or if there was an easy or recommended way?
Thank you.
Phillip
I have the following menu tree.
label: 'Inbox', icon: 'fa fa-fw fa-phone',
items: [
{ label: 'All Incoming', icon: 'im-icon im-icon-phone-incoming', badge: this.callTotals.inboundAll, routerLink: ['/calls/all'] },
{ label: 'Answered', icon: 'im-icon im-icon-call-in', badge: this.callTotals.answered, routerLink: ['/calls/ans'] },
{ label: 'Missed', icon: 'im-icon im-icon-call-missed', badge: this.callTotals.missed, routerLink: ['/calls/miss'] },
If a user deep links to to the "/calls/ans" route, is it possible to have the menu automatically reflect this route on start?
I can probably write some code to crawl the menu tree and set active on a match, but I was just wondering if I was missing something or if there was an easy or recommended way?
Thank you.
Phillip