Topic: SideNav Creation from Array
modernwebdesign pro premium priority asked 6 years ago
[Error] ERROR – TypeError: undefined is not an object (evaluating 'this.body.toggle')This is my HTML
<mdb-accordion-item *ngFor="let item of menuitems" [ngClass]="{'no-collase': item.submenu.length == 0}"> <mdb-accordion-item-headmdbWavesEffect> <fa-icon[icon]="item.icon"class="icon"></fa-icon> {{ 'webapp.menu.' + item.key | translate:lang }} </mdb-accordion-item-head> <mdb-accordion-item-body*ngIf="item.submenu.length != 0"> <ul> <li*ngFor="let subitem of item.submenu"> <aclass="nav-link waves-light"mdbWavesEffectrouterLink="{{subitem.routerlink}}"> <fa-icon[icon]="subitem.icon"class="icon"></fa-icon> <spanclass="clearfix d-none d-sm-inline-block">{{ 'webapp.menu.' + subitem.key | translate:lang }}</span> </a> </li> </ul> </mdb-accordion-item-body> </mdb-accordion-item>and this is my Array
menuitems:any[] = [ {key: "dashboard", routerlink: "/settings", icon: this.faDashboard, submenu: []}, {key: "settings", routerlink: "/settings", icon: this.faCog, submenu: []} ];
Damian Gemza staff answered 6 years ago
npm install git+https://oauth2:<your-token>@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git#dev --saveBut please be aware that #dev is a branch on which we're currently working. So it may contain some bugs which We haven't discovered yet. Best Regards, Damian
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Pro
- Premium support: Yes
- Technology: MDB Angular
- MDB Version: 6.2.2
- Device: PC
- Browser: Safari
- OS: Mac OSX 10.14
- Provided sample code: Yes
- Provided link: No