-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法在loadChildren后的子路由中使用nz组件 #151
Labels
Comments
You have to import |
推荐比较合理的做法是在 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm submitting a...
Current behavior
在配置好路由RouterModule.forRoot(appRouters)后,通过{path: 'main', loadChildren: './main/main.module#MainModule'}懒加载之后的模块无法使用nz组件,
报错为:ERROR Error: Uncaught (in promise): Error: Template parse errors:
'nz-dropdown' is not a known element:
[ERROR ->]
more </"): ng:///ItemsModule/TodoComponent.html@29:4
Error: Template parse errors:
'nz-dropdown' is not a known element:
Expected behavior
希望支持下级module引用
Minimal reproduction of the problem with instructions
import: BrowserAnimationsModule,
NgZorroAntdModule.forRoot(),
RouterModule.forRoot(appRouters)
What is the motivation / use case for changing the behavior?
最后一个module需要再次import引用NgZorroAntdModule,无法实现“在根 module 中使用 NgZorroAntdModule.forRoot(),在子 module 中使用 NgZorroAntdModule 即可”,望提供解决方案
Environment
angular-cli:“1.3.0”
ng-zorro-antd: "^0.5.0-rc.2"
The text was updated successfully, but these errors were encountered: