Angular NG-ZORRO. How to split the component into templates

363 views Asked by At

I am just starting with Angular. And I used ng-ZORRO.

  1. I copy the example of ng-zorro. It works well.
  2. I split it into templates using ng-template and ngTemplateOutlet. It doesn't work.

See my example about Menu.

  • Menu1, Menu2 are normal codes. It works.
  • Menu3, I use the ng-template. It doesn't work.

Please help me.

stackblitz link: https://stackblitz.com/edit/ng-zorro-antd-ivy-5reyrg

1

There are 1 answers

0
Edoardo Schirra On

you have not imported the service necessary for the nz-menu-item directive to work, so the entry is not displayed