File tree 2 files changed +5
-2
lines changed 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 3
3
< mat-select-trigger >
4
4
{{toppings.value ? toppings.value[0] : ''}}
5
5
< span *ngIf ="toppings.value?.length > 1 " class ="example-additional-selection ">
6
- (+{{toppings.value.length - 1}} others)
6
+ (+{{toppings.value.length - 1}} {{toppings.value?.length === 2 ? 'other' : ' others'}} )
7
7
</ span >
8
8
</ mat-select-trigger >
9
9
< mat-option *ngFor ="let topping of toppingList " [value] ="topping "> {{topping}}</ mat-option >
Original file line number Diff line number Diff line change 1
- import { Component } from '@angular/core' ;
1
+ import { Component , ViewEncapsulation } from '@angular/core' ;
2
2
import { FormControl } from '@angular/forms' ;
3
3
4
4
/**
@@ -8,6 +8,9 @@ import {FormControl} from '@angular/forms';
8
8
selector : 'select-panel-class-example' ,
9
9
templateUrl : 'select-panel-class-example.html' ,
10
10
styleUrls : [ 'select-panel-class-example.css' ] ,
11
+ // Encapsulation has to be disabled in order for the
12
+ // component style to apply to the select panel.
13
+ encapsulation : ViewEncapsulation . None ,
11
14
} )
12
15
export class SelectPanelClassExample {
13
16
panelColor = new FormControl ( 'red' ) ;
You can’t perform that action at this time.
0 commit comments