@@ -65,12 +63,10 @@ import { NbWindowRef } from './window-ref';
`,
- styleUrls: ['./window.component.scss'],
- standalone: false
+ styleUrls: ['./window.component.scss'],
+ standalone: false,
})
export class NbWindowComponent implements OnInit, AfterViewChecked, OnDestroy {
- @Input() cfr: ComponentFactoryResolver;
-
@HostBinding('class.full-screen')
get isFullScreen() {
return this.windowRef.state === NbWindowState.FULL_SCREEN;
@@ -181,7 +177,7 @@ export class NbWindowComponent implements OnInit, AfterViewChecked, OnDestroy {
}
protected attachComponent() {
- const portal = new NbComponentPortal(this.content as Type
, null, null, this.cfr);
+ const portal = new NbComponentPortal(this.content as Type, null, null);
const ref = this.overlayContainer.attachComponentPortal(portal, this.context);
this.windowRef.componentInstance = ref.instance;
diff --git a/src/framework/theme/components/window/window.service.ts b/src/framework/theme/components/window/window.service.ts
index 1343c15108..8ba4baf389 100644
--- a/src/framework/theme/components/window/window.service.ts
+++ b/src/framework/theme/components/window/window.service.ts
@@ -1,12 +1,4 @@
-import {
- ComponentFactoryResolver,
- ComponentRef,
- Inject,
- Injectable,
- Injector,
- TemplateRef,
- ViewContainerRef,
-} from '@angular/core';
+import { ComponentRef, Inject, Injectable, Injector, TemplateRef, ViewContainerRef } from '@angular/core';
import { filter } from 'rxjs/operators';
import { NbComponentPortal, NbComponentType, NbOverlayPositionBuilder, NbOverlayRef } from '../cdk/overlay/mapping';
import { NbOverlayService } from '../cdk/overlay/overlay-service';
@@ -111,12 +103,10 @@ export class NbWindowService {
protected openWindows: NbWindowRef[] = [];
constructor(
- protected componentFactoryResolver: ComponentFactoryResolver,
protected overlayService: NbOverlayService,
protected overlayPositionBuilder: NbOverlayPositionBuilder,
protected blockScrollStrategy: NbBlockScrollStrategyAdapter,
@Inject(NB_WINDOW_CONFIG) protected readonly defaultWindowsConfig: NbWindowConfig,
- protected cfr: ComponentFactoryResolver,
@Inject(NB_DOCUMENT) document,
) {
this.document = document;
@@ -161,7 +151,7 @@ export class NbWindowService {
positionStrategy: this.overlayPositionBuilder.global().bottom().right(),
hasBackdrop: true,
});
- const windowsContainerPortal = new NbComponentPortal(NbWindowsContainerComponent, null, null, this.cfr);
+ const windowsContainerPortal = new NbComponentPortal(NbWindowsContainerComponent, null, null);
const overlayRef = this.overlayRef.attach(windowsContainerPortal);
this.windowsContainerViewRef = overlayRef.instance.viewContainerRef;
}
@@ -183,14 +173,10 @@ export class NbWindowService {
? config.viewContainerRef.injector
: this.windowsContainerViewRef.injector;
const injector = Injector.create({ parent: parentInjector, providers });
- const windowFactory = this.componentFactoryResolver.resolveComponentFactory(NbWindowComponent);
- const ref = this.windowsContainerViewRef.createComponent(
- windowFactory,
- this.windowsContainerViewRef.length,
+ const ref = this.windowsContainerViewRef.createComponent(NbWindowComponent, {
injector,
- );
- ref.instance.cfr = this.cfr;
+ });
ref.changeDetectorRef.detectChanges();
return ref;
}
diff --git a/src/playground/playground-routing.module.ts b/src/playground/playground-routing.module.ts
index b7191b51e4..7051801bac 100644
--- a/src/playground/playground-routing.module.ts
+++ b/src/playground/playground-routing.module.ts
@@ -16,6 +16,22 @@ export const routes: Routes = [
path: '',
loadChildren: () => import('./without-layout/without-layout.module').then((m) => m.WithoutLayoutModule),
},
+ {
+ path: '',
+ loadChildren: () => import('./with-layout/with-layout.module').then((m) => m.WithLayoutModule),
+ },
+ {
+ path: '',
+ loadChildren: () => import('./without-layout/without-layout.module').then((m) => m.WithoutLayoutModule),
+ },
+ {
+ path: '',
+ loadChildren: () => import('./with-layout/with-layout.module').then((m) => m.WithLayoutModule),
+ },
+ {
+ path: '',
+ loadChildren: () => import('./without-layout/without-layout.module').then((m) => m.WithoutLayoutModule),
+ },
];
@NgModule({
diff --git a/src/playground/playground.module.ts b/src/playground/playground.module.ts
index 9cfcddb1ff..30d51373b4 100644
--- a/src/playground/playground.module.ts
+++ b/src/playground/playground.module.ts
@@ -9,6 +9,6 @@ import { NgModule } from '@angular/core';
import { PlaygroundRoutingModule } from './playground-routing.module';
@NgModule({
- imports: [ PlaygroundRoutingModule ],
+ imports: [PlaygroundRoutingModule],
})
export class PlaygroundModule {}
diff --git a/src/playground/without-layout/firebase/identity-proders-auth-showcase/identity-providers-auth-showcase.component.html b/src/playground/without-layout/firebase/identity-proders-auth-showcase/identity-providers-auth-showcase.component.html
index bbb3fb6e2a..98365c03fb 100644
--- a/src/playground/without-layout/firebase/identity-proders-auth-showcase/identity-providers-auth-showcase.component.html
+++ b/src/playground/without-layout/firebase/identity-proders-auth-showcase/identity-providers-auth-showcase.component.html
@@ -10,16 +10,8 @@
{{ data$ | async | json }}
-