fix(common): NgSwitch - don’t create the default case if another case matches (#12726)

This also simplifies the implementation of `NgSwitch`.

Closes #11297
Closes #9420
This commit is contained in:
Tobias Bosch
2016-11-07 12:22:36 -08:00
committed by vikerman
parent 32fcec9fcb
commit d8f23f4b7f
3 changed files with 196 additions and 167 deletions

View File

@ -166,14 +166,15 @@ export declare class NgSwitch {
}
/** @stable */
export declare class NgSwitchCase {
export declare class NgSwitchCase implements DoCheck {
ngSwitchCase: any;
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
ngDoCheck(): void;
}
/** @stable */
export declare class NgSwitchDefault {
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, sswitch: NgSwitch);
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
}
/** @experimental */