Skip to content

Commit ac52cab

Browse files
committed
build(material-angular-io): fix docs site deployment
Fixes that the docs site deployment which broke after #30570.
1 parent eef7d66 commit ac52cab

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

material.angular.io/src/app/shared/doc-viewer/doc-viewer.ts

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {DomSanitizer} from '@angular/platform-browser';
1010
import {
1111
ApplicationRef,
1212
Component,
13-
ComponentFactoryResolver,
1413
ElementRef,
1514
EventEmitter,
1615
Injectable,
@@ -60,7 +59,6 @@ class DocFetcher {
6059
})
6160
export class DocViewer implements OnDestroy {
6261
private _appRef = inject(ApplicationRef);
63-
private _componentFactoryResolver = inject(ComponentFactoryResolver);
6462
_elementRef = inject(ElementRef);
6563
private _injector = inject(Injector);
6664
private _viewContainerRef = inject(ViewContainerRef);
@@ -174,12 +172,7 @@ export class DocViewer implements OnDestroy {
174172
const example = element.getAttribute(componentName);
175173
const region = element.getAttribute('region');
176174
const file = element.getAttribute('file');
177-
const portalHost = new DomPortalOutlet(
178-
element,
179-
this._componentFactoryResolver,
180-
this._appRef,
181-
this._injector,
182-
);
175+
const portalHost = new DomPortalOutlet(element, this._appRef, this._injector);
183176
const examplePortal = new ComponentPortal(componentClass, this._viewContainerRef);
184177
const exampleViewer = portalHost.attach(examplePortal);
185178
const exampleViewerComponent = exampleViewer.instance as ExampleViewer;
@@ -219,14 +212,7 @@ export class DocViewer implements OnDestroy {
219212
// the deprecation message, it will include alternative to deprecated item
220213
// and breaking change if there is one included.
221214
const deprecationTitle = element.getAttribute('deprecated-message');
222-
223-
const elementPortalOutlet = new DomPortalOutlet(
224-
element,
225-
this._componentFactoryResolver,
226-
this._appRef,
227-
this._injector,
228-
);
229-
215+
const elementPortalOutlet = new DomPortalOutlet(element, this._appRef, this._injector);
230216
const tooltipPortal = new ComponentPortal(DeprecatedFieldComponent, this._viewContainerRef);
231217
const tooltipOutlet = elementPortalOutlet.attach(tooltipPortal);
232218

@@ -247,14 +233,7 @@ export class DocViewer implements OnDestroy {
247233
[...moduleImportElements].forEach((element: HTMLElement) => {
248234
// get the module import path stored in the attribute
249235
const moduleImport = element.getAttribute('data-docs-api-module-import-button');
250-
251-
const elementPortalOutlet = new DomPortalOutlet(
252-
element,
253-
this._componentFactoryResolver,
254-
this._appRef,
255-
this._injector,
256-
);
257-
236+
const elementPortalOutlet = new DomPortalOutlet(element, this._appRef, this._injector);
258237
const moduleImportPortal = new ComponentPortal(
259238
ModuleImportCopyButton,
260239
this._viewContainerRef,

0 commit comments

Comments
 (0)