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

Method constructor

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

Source from the content-addressed store, hash-verified

256})
257export class NgSwitchDefault {
258 constructor(
259 viewContainer: ViewContainerRef,
260 templateRef: TemplateRef<Object>,
261 @Optional() @Host() ngSwitch: NgSwitch,
262 ) {
263 if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {
264 throwNgSwitchProviderNotFoundError('ngSwitchDefault', 'NgSwitchDefault');
265 }
266
267 ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
268 }
269}
270
271function throwNgSwitchProviderNotFoundError(attrName: string, directiveName: string): never {

Callers

nothing calls this directly

Calls 4

OptionalInterface · 0.90
HostInterface · 0.90
_addDefaultMethod · 0.80

Tested by

no test coverage detected