Page 1 of 1

Open menu tree based on selected route

Posted: 09 Nov 2017, 22:00
by phill_jones
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.


Re: Open menu tree based on selected route

Posted: 01 Dec 2017, 12:15
by cagatay.civici