/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { DoCheck, TemplateRef, ViewContainerRef } from '@angular/core'; export declare class SwitchView { private _viewContainerRef; private _templateRef; private _created; constructor(_viewContainerRef: ViewContainerRef, _templateRef: TemplateRef); create(): void; destroy(): void; enforceState(created: boolean): void; } /** * @ngModule CommonModule * * @whatItDoes Adds / removes DOM sub-trees when the nest match expressions matches the switch * expression. * * @howToUse * ``` * * ... * ... * ... * * * * * * ... * * ``` * @description * * `NgSwitch` stamps out nested views when their match expression value matches the value of the * switch expression. * * In other words: * - you define a container element (where you place the directive with a switch expression on the * `[ngSwitch]="..."` attribute) * - you define inner views inside the `NgSwitch` and place a `*ngSwitchCase` attribute on the view * root elements. * * Elements within `NgSwitch` but outside of a `NgSwitchCase` or `NgSwitchDefault` directives will * be preserved at the location. * * The `ngSwitchCase` directive informs the parent `NgSwitch` of which view to display when the * expression is evaluated. * When no matching expression is found on a `ngSwitchCase` view, the `ngSwitchDefault` view is * stamped out. * * @stable */ export declare class NgSwitch { private _defaultViews; private _defaultUsed; private _caseCount; private _lastCaseCheckIndex; private _lastCasesMatched; private _ngSwitch; ngSwitch: any; private _updateDefaultCases(useDefault); } /** * @ngModule CommonModule * * @whatItDoes Creates a view that will be added/removed from the parent {@link NgSwitch} when the * given expression evaluate to respectively the same/different value as the switch * expression. * * @howToUse * ``` * * ... * *``` * @description * * Insert the sub-tree when the expression evaluates to the same value as the enclosing switch * expression. * * If multiple match expressions match the switch expression value, all of them are displayed. * * See {@link NgSwitch} for more details and example. * * @stable */ export declare class NgSwitchCase implements DoCheck { private ngSwitch; private _view; ngSwitchCase: any; constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, ngSwitch: NgSwitch); ngDoCheck(): void; } /** * @ngModule CommonModule * @whatItDoes Creates a view that is added to the parent {@link NgSwitch} when no case expressions * match the * switch expression. * * @howToUse * ``` * * ... * ... * * ``` * * @description * * Insert the sub-tree when no case expressions evaluate to the same value as the enclosing switch * expression. * * See {@link NgSwitch} for more details and example. * * @stable */ export declare class NgSwitchDefault { constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, ngSwitch: NgSwitch); }