-
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
perf(all): improve rxjs imports #29
Conversation
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.
mark a comment, need to review
@@ -144,7 +145,7 @@ export class NzSubMenuComponent implements OnInit, OnDestroy, AfterViewInit { | |||
} | |||
|
|||
ngOnInit() { | |||
this._$mouseSubject.debounceTime(300).subscribe((data: boolean) => { | |||
debounceTime.call(this._$mouseSubject, 300).subscribe((data: boolean) => { |
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.
should wrap with runOutsideAngular.
runOutsideAngular
means that every hooked global async func will restore.
baraly introduce rxjs without ngZone
check is not recommend.
if use runOutsideAngular
, the detectChange does't work, can force trigger detect change with ChangeDetectorRef
injected in contructor as private changeDectorRef: ChangeDetectorRef
then call this.changeDectorRef.detectChanges()
.
hope to help you
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.
That could be done in a separate request, since this is only for fixing the rxjs imports, shouldn't change any other part of the lib.
import {} from 'rxjs/Rx'请问这句代码应该添加到那里 |
@FunClub Nowhere if you're writing front-end. |
请问 NG-ZORRO怎么按需加载,以减小打包体积 |
import {} from 'rxjs/Rx'
will include the entire RxJS library.Fixes #50 .
Relates to #18 .