1234567891011121314151617181920212223242526272829303132333435363738 |
- import { InjectionToken, inject, Injector, afterNextRender } from '@angular/core';
- import { Observable } from 'rxjs';
- /**
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
- */
- /**
- * An injection token representing `afterNextRender` as an observable rather
- * than a callback-based API has been added. This might be necessary in code
- * where streams of data are already being used and we need to wait until
- * the change detection ends before performing any tasks.
- */
- const NZ_AFTER_NEXT_RENDER$ = new InjectionToken('nz-after-next-render', {
- providedIn: 'root',
- factory: () => {
- const injector = inject(Injector);
- return new Observable(subscriber => {
- const ref = afterNextRender(() => {
- subscriber.next();
- subscriber.complete();
- }, { injector });
- return () => ref.destroy();
- });
- }
- });
- /**
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
- */
- /**
- * Generated bundle index. Do not edit.
- */
- export { NZ_AFTER_NEXT_RENDER$ };
- //# sourceMappingURL=ng-zorro-antd-core-render.mjs.map
|