MCPcopy
hub / github.com/angular/angular / Preview

Class Preview

adev/src/app/editor/preview/preview.component.ts:23–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 imports: [PreviewError],
22})
23export class Preview {
24 private readonly domSanitizer = inject(DomSanitizer);
25 private readonly nodeRuntimeSandbox = inject(NodeRuntimeSandbox);
26 private readonly nodeRuntimeState = inject(NodeRuntimeState);
27
28 loadingProgressValue = this.nodeRuntimeState.loadingStep;
29 protected loadingEnum = LoadingStep;
30
31 readonly previewUrl = toSignal(this.nodeRuntimeSandbox.previewUrl$, {initialValue: null});
32 protected readonly previewUrlForIFrame = computed(() => {
33 const url = this.previewUrl();
34 return url !== null ? this.domSanitizer.bypassSecurityTrustResourceUrl(url) : null;
35 });
36}

Callers

nothing calls this directly

Calls 4

injectFunction · 0.90
toSignalFunction · 0.90
computedFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…