-
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
feat(module:root): make nz-root optional #36
Conversation
The coverage has increased, but since the original coverage is fake (most of the source files didn't being count into), it has wrong result in the report. |
original coverage count is not correct. |
|
||
export class NzRootModule { | ||
constructor(@Inject(DOCUMENT) _document: Document, injector: Injector, resolver: ComponentFactoryResolver) { | ||
const componentFactory = resolver.resolveComponentFactory(NzRootStyleComponent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
users may insert nz-root
manually , maybe a judgement condition should be added here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already been resolved on NzRootComponent
side:
this.nzExtraFontName && this.nzExtraFontUrl && !this.options.
docs needed after nz-root is optional. |
Should it be:
And should we change the way that showcase app uses? |
what about removing |
Sounds good, would update it soon. |
* master: refactor(module:dropdown): improve performance (NG-ZORRO#148) feat(module:tooltip,popconfirm,popover): support OnPush (NG-ZORRO#143) release(0.5.0-rc.3): pre-release 0.5.0-rc.3 (NG-ZORRO#166) fix(module:carousel): fix carousel auto play bug (NG-ZORRO#164) fix(module:input): fix input disabled style bug (NG-ZORRO#160) fix(module:input): fix input disabled style bug (NG-ZORRO#108) fix(module:affix,anchor,back-top): fix and improve rxjs usage (NG-ZORRO#159) feat(module:affix&anchor&back-top&avatar): add components to library (NG-ZORRO#88) fix(module:select): fix select reset bug in form (NG-ZORRO#153) fix(module:pagination) fix pagination double binding (NG-ZORRO#146) fix(module:select): fix option incorrect active status (NG-ZORRO#141) feat(module:root): make nz-root optional (NG-ZORRO#36)
Closes #34 .
API in detail:
For
NgZorroAntdModule.forRoot()
method, there is an optional parameter in signature{ extraFontName: string, extraFontUrl: string }
, like:It would be same as using
<nz-root nzExtraFontName="some-name" nzExtraFontUrl="some-url">
.Meanwhile, user can manually provide an
NZ_ROOT_CONFIG
if they don't want to import the entire lib.