-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
Description
Reproduction link
| this.ngZone.runOutsideAngular(() => { |
Steps to reproduce
- Create a project with Angular Universal
- Attempt to use dynamically loaded SVG icons as described in docs with
nz-icon - Build for SSR and run locally
- App crashes
What is expected?
Icons are loaded
What is actually happening?
Angular is running on http://localhost:4000
Angular is running in development mode. Call enableProdMode() to enable production mode.
/Users/xxx/Documents/yyy/dist/zzz/server/main.js:309464
throw error;
^
Error: [@ant-design/icons-angular]:the icon delete-o does not exist or is not registered.
at IconNotFoundError (/Users/xxx/Documents/yyy/dist/zzz/server/main.js:477160:10)
at /Users/xxx/Documents/yyy/dist/zzz/server/main.js:477315:15
| Environment | Info |
|---|---|
| ng-zorro-antd | 13.0.1 |
| Browser | Any |
See refactor of changeIcon2 in NzIconDirective 12.1.1:
| this.ngZone.runOutsideAngular(() => { |
It appears this throws the above error when running in a Node environment (e.g. Angular Universal).