Topic: ngfor does not work in navbar

Juan Carlos Estevez free asked 5 years ago

HelloI am trying to load menus automatically with a variable array but it does not load, I am using mdboostrap free.

Not work:

<ul class="navbar-nav"><li *ngFor="let menu of dataMenu" class="nav-item"><br> <a class="nav-link waves-light" mdbWavesEffect>{{menu.opcion}}</a><br> </li> </ul>

it Works:

<ul><li *ngFor="let menu of dataMenu"><a href="#">{{menu.opcion}}</a></li></ul>

waiting for your helpregardsJuan C.

p4k1tz free answered 2 years ago

I feel like this question was pretty clear. When using the navbar-nav class, the menu does not show. Pretty similar to an issue I am currently having 3 years later.

Arkadiusz Idzikowski staff answered 5 years ago


Could you provide more information about the problems in the first case?

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.4.1
  • Device: laptop
  • Browser: all browser
  • OS: windows 10
  • Provided sample code: No
  • Provided link: No