MCPcopy Index your code
hub / github.com/angular/angular / constructor

Method constructor

packages/common/src/directives/ng_switch.ts:216–227  ·  view source on GitHub ↗
(
    viewContainer: ViewContainerRef,
    templateRef: TemplateRef<Object>,
    @Optional() @Host() private ngSwitch: NgSwitch,
  )

Source from the content-addressed store, hash-verified

214 @Input() ngSwitchCase: any;
215
216 constructor(
217 viewContainer: ViewContainerRef,
218 templateRef: TemplateRef<Object>,
219 @Optional() @Host() private ngSwitch: NgSwitch,
220 ) {
221 if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {
222 throwNgSwitchProviderNotFoundError('ngSwitchCase', 'NgSwitchCase');
223 }
224
225 ngSwitch._addCase();
226 this._view = new SwitchView(viewContainer, templateRef);
227 }
228
229 /**
230 * Performs case matching. For internal use only.

Callers

nothing calls this directly

Calls 4

OptionalInterface · 0.90
HostInterface · 0.90
_addCaseMethod · 0.80

Tested by

no test coverage detected