-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page refresh loses selected option and sets default Home as selected option #21
Comments
I have found a workaround. I added inside app.component.ts the following life cycle event inside the function : private initializeOptions(): void { } `
} For now it is working for me till there will be another option. |
Sorry for taking so long to fix this issue. In the last update I've added two custom decorators that should allow you to fix this issue. Please review the Navigation outside the side menu section to find how you can use the So basically now each page can tell the side menu component which option should be marked as selected when the user enters to that page. So for example, in the following page:
The line I'll close this issue now but feel free to re-open it if you need any help. Thanks :) |
Hello,
First of all thanks a lot for such a nice implementation.
You have explained very nice how to set the selected option when we navigate with a button to an option.
I have a one question. When I refresh the page then gets selected option automatically default page, in this case Home.
For example I have a menu structure: Home - Users - Products.
I chose the Users menu then the URL is http://localhost:8100/#/user-list and Users menu is selected, so far so good.
When I refresh the page (http://localhost:8100/#/user-list) then Home will be automatically selected, not the Users menu.
For sure I can send the event to the menu option on user.list.component.ts but think that I have 20 more components and 20 menus. Then I have to implement in every page. Is there a way in one place to configure selected menu with page refresh?
The text was updated successfully, but these errors were encountered: