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.

treeview can't expand at angular8

See original GitHub issue

Issue type:

  • Feature request
  • Bug report
  • Documentation

Environment:

  • AdminLTE Version: 2.4.15
  • Operating System: windows7
  • Browser (Version): Chrome (Latest)

Description:

        <li class="treeview">
          <a href="#">
            <i class="fa fa-edit"></i> <span>出发地</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li [class.active]="_path ==='/traffic/simplesourcemap'"><a href="traffic/simplesourcemap"><i
                  class="fa fa-link"></i> <span>出发地分析</span></a></li>
            <li [class.active]="_path ==='/traffic/sourcemap'"><a href="traffic/sourcemap"><i class="fa fa-link"></i>
                <span>出发地分析[分时]</span></a></li>
            <li [class.active]="_path ==='/traffic/weeklysourcemap'"><a href="traffic/weeklysourcemap"><i
                  class="fa fa-link"></i>
                <span>出发地分析[周次]</span></a></li>
          </ul>
        </li>
const routes: Routes = [
  {
    path: 'traffic', component: TrafficMainComponent,
    children: [
      { path: 'dashboard', component: DashboardComponent, resolve: { data: DashBoardResolver } },
      { path: 'timeanalysis', component: TimeAnalysisComponent, resolve: { data: TimeAnaysisResolver } },
      { path: 'simplesourcemap', component: SimpleMapComponent, resolve: { data: SimpleSourceMapResolver } },
      { path: 'simpledestmap', component: SimpleMapComponent , resolve: { data: SimpleDestMapResolver } },
      { path: 'sourcemap', component: TimeLineMapComponent, resolve: { data: SourceMapResolver } },
      { path: 'destmap', component: TimeLineMapComponent , resolve: { data: DestMapResolver } },
      { path: 'weeklysourcemap', component: TimeLineMapWeekNoComponent, resolve: { data: SourceMapWeeKnoResolver } },
      { path: 'weeklydestmap', component: TimeLineMapWeekNoComponent, resolve: { data: DestMapWeeKnoResolver } },
      { path: 'trace', component: TraceMapComponent, resolve: { data: TraceResolver }  },
      { path: 'calendar', component: CalendarComponent , resolve: { data: CalendarResolver } },
      { path: '', redirectTo: 'dashboard', pathMatch: 'full' }
    ]
  }
];

The treeview menu sometimes work well,but some times,the page jump to ‘/#’ page when click the (#)link.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:29

github_iconTop GitHub Comments

1reaction
magicdictcommented, Sep 25, 2019
            "scripts": [
              "./node_modules/jquery/dist/jquery.min.js",
              "./node_modules/jquery-ui-dist/jquery-ui.js",
              "./node_modules/admin-lte/bower_components/bootstrap/dist/js/bootstrap.min.js",
              "./node_modules/admin-lte/dist/js/adminlte.min.js"
            ]
import { Component, OnInit} from '@angular/core';
declare var $: any;

@Component({
  selector: 'app-root',
  templateUrl: './TrafficMain.component.html',
})
export class TrafficMainComponent implements OnInit {
  constructor() { }
  ngOnInit() {
    $(document).ready(() => {
      const trees: any = $('[data-widget="tree"]');
      if (trees) {
        trees.tree();
      }
    });
  }
}
0reactions
magicdictcommented, Sep 25, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot expand all nodes in Kendo TreeView - Stack Overflow
I want to show my Kendo UI TreeView expanded at all time, but it will only show collapsed. When reloading the datasource, I...
Read more >
Persisting the Expanded State - TreeView - Kendo UI for Angular
The TreeView exposes the following options to control the expand state: isExpanded (function)—Determines if a given node is expanded. collapse (event)—Fired ...
Read more >
On expand/collapse row before data bound with virtualzation ...
Forum Thread - Tree View - On expand/collapse row before data bound with virtualzation makes rows dissapear - Angular - EJ 2.
Read more >
Expand and Collapse Nodes - DevExtreme - DevExpress
The TreeView provides the following API to expand and collapse nodes: All nodes ... { static: false }) treeView: DxTreeViewComponent;; // Prior to...
Read more >
ngx-treeview - npm
An Angular treeview component with checkbox. Latest version: 10.0.2, last published: 2 years ago. Start using ngx-treeview in your project ...
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