You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some components, like NzSpinComponent, allow specifying a TemplateRef<T> instance via the new global configuration.
However, for users it might not be clear how to programmatically create it in NgModule context (in fact it was a bit of a surprise to me too). The following is a snippet which can be integrated to show that.
This looks great. Could you please submit a PR to change the Global Configuration chapter of the official doc? You could make this approach more generic by renaming SpinTplComponent to GlobalTemplateComponent.
And, there's a simpler approach. In App component:
What problem does this feature solve?
Some components, like
NzSpinComponent
, allow specifying aTemplateRef<T>
instance via the new global configuration.However, for users it might not be clear how to programmatically create it in
NgModule
context (in fact it was a bit of a surprise to me too). The following is a snippet which can be integrated to show that.app.module.ts
Points to remember:
export
ing the component is required for AOT compatibilitydeclarations
andentryComponents
What does the proposed API look like?
Not needed.
The text was updated successfully, but these errors were encountered: