question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sidebar menu treeview not working after redirection in Angular 8 [BUG]

See original GitHub issue

Describe 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:

  1. Go to login page
  2. Continue to be redirected to the Dashboard
  3. 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

11reactions
REJackcommented, Mar 24, 2020

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.

6reactions
swtw122commented, Apr 26, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found