I'm trying to dynamically build a menu using the ng-zorro library. The problem is that I want to render nested submenus using recursive ng-template, and I'm getting the error when trying to use the nz-submenu directive inside ng-template.
The error is NullInjectorError: No provider for MenuService!
Here is the demo: https://stackblitz.com/edit/angular-ojfbuo-ktddi3?file=src/app/app.component.ts.
Has anybody encountered such a problem and was able to fix it?