Ask Question <https://stackoverflow.com/questions/ask> 0
I want to create a dynamic menu, one that is get from database. Here is the StackBlitz project <https://stackblitz.com/edit/angular-dmenu?file=src/app/dynamic-menu/dynamic-menu.component.html> . In the dynamic-menu.component.html of the StackBlitz project are the dynamic solution and commented is the static solution. The static solution should be how the dynamic solution will be rendered after executes. If i just run with the static solution everything runs as expected(just uncomment the static code and comment the dynamic code), but if i try with the dynamic solution the menu does not work as expected.The ui stays completely disorganize and the sub menus do not work well. Is this related with how *ng-template* affect the CSS styles ? Looking through Chrome developer tools i am able to see that the *class="mat-menu-item ng-star-inserted"* attribute in the dynamic version is added to the button for instance and this does not happen in the static version. I have try everything but i can not get it why is this happening. And how can i fix this. I am new to Angular but i want really understands how the frameworks works -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/38e9220a-8aab-462a-91f0-e38f92331c28%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.