Sidebar menu treeview not working after redirection in Angular 8 [BUG]
See original GitHub issueDescribe the bug Once you log in using the login page you will be redirected to the Dashboard. In this moment in the Dashboard the sidebar menu “treeview” option does not open. Also, a menu with a simple link (not treeview) does not work and sometimes the website is reload when you click on it.
To Reproduce Steps to reproduce the behavior:
- Go to login page
- Continue to be redirected to the Dashboard
- Try to click on a sidebar menu treeview
Expected behavior A working sidebar menu treeview after a redirection from the log in page.
Environment:
- AdminLTE Version: 3.0.2
- Angular 8.3.21
- Operating System: macOS Catalina
- Browser (Version): Chrome (Latest)
Additional context The same problem has been reported for Angular 4 and AdminLTE v2 here, but the solutions provided there does not work in Angular 8.
angular.json
"styles": [
"node_modules/admin-lte/plugins/fontawesome-free/css/all.min.css",
"node_modules/admin-lte/dist/css/adminlte.min.css",
"src/styles.scss"
],
"scripts": [
"node_modules/admin-lte/plugins/jquery/jquery.min.js",
"node_modules/admin-lte/plugins/bootstrap/js/bootstrap.bundle.min.js",
"node_modules/admin-lte/dist/js/adminlte.min.js"
]
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12
Top Results From Across the Web
Sidebar menu treeview not working after redirection in Angular 4
Hi,. I'm using AdminLTE theme (2.4.0-rc) in Angular4 project. Dashboard with the sidebar menu is on url "http://host/".
Read more >Angular 4 + AdminLTE. Treeview-menu isnt working
So, im working in a plataform and im using Angular 4 and AdminLTE. After logging into the dashboard, my treeview menu doesnt work....
Read more >Angular With Adminlte3 Sidebar Treeview Bug - ADocLib
Describe the bug Once you log in using the login page you will be redirected to Sidebar menu treeview not working after redirection...
Read more >Safari Technology Preview Release Notes - Apple Developer
On macOS Big Sur, this release requires enabling GPU Process: Media option from Experimental Features under the Develop menu to address issues with...
Read more >How To Create a Sidebar with Icons - W3Schools
This side navigation is of full height (100%) and always shown. Lorem ipsum dolor sit amet, illum definitiones no quo, maluisset concludaturque et...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You need to init the TreeView after login, with
$('[data-widget="treeview"]').Treeview('init')
.This issue https://github.com/ColorlibHQ/AdminLTE/issues/2550 can help you.
Hey guys, I had the same issue and fixed it with:
in the imports section add…
declare var $: any;
in ngOnInit section…
$('[data-widget="treeview"]').Treeview('init');
inside the sidebar component