When nz-submenu is used as a dynamic menu in ng-zorro, the left offset of the submenu cannot be realized.

1. ng-zorro nz-submenu get the child nz-submenu through @ ContentChildren () and set its level property to realize the left offset of the child nz-submenu in the menu tree;

2. Use nz-submenu to make a dynamic menu. You need to create a new build and recursive.

the problem encountered now is: @ ContentChildren () seems to only grab the child nz-submenu within the component, but cannot get the child nz-submenu in the recursion, so the level of the child nz-submenu cannot be set in the recursion, which leads to the left alignment of the child nz-submenu with the parent nz-submenu , which can not achieve the display effect.

my solution is to set the level property, but it has no @ Input () decoration and cannot be set from external components;
do you have any solutions?

without changing the original code
Mar.21,2021

has a similar issue https://github.com/NG-ZORRO/n.

Menu