Hi,
I am using aspnet core with angular 2
I have a lot of menu items about 100. The problem that I have is when I am in the last menu items and click on a menu item the page loads but it does not take me to top and I have to manuall scroll which is bad UX?
How can I fix this?
Thanks
1 Answer(s)
-
0
Hi @antonis ,
Actually we haven't tested AspNet Zero with that much menu items. You are right, this is not a good usage for users.
The first solution comes to my mind is, you can handle route change event for admin routing module like we did for account module here: <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/account/account-routing.module.ts#L48">https://github.com/aspnetzero/aspnet-ze ... ule.ts#L48</a>
In that event, you can scroll page to top using jQuery.
There might be some other solutions but this is the first one I can think of :).