app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
languages = [
"JavaScript","HTML","CSS","Kotlin",
"Python","SQL","Java","C#"
];
}
app.component.html
<h2 style="padding-top:25px; padding-bottom:16px;">
Angular Material - How to use Selection List
</h2>
<h3>
Selected {{list.selectedOptions.selected.length}} language(s)
</h3>
<mat-selection-list #list>
<mat-list-option *ngFor="let language of languages">
{{language}}
</mat-list-option>
</mat-selection-list>
app.module.ts [import]
import { MatListModule } from '@angular/material/list'
- angular material - How to use indeterminate Progress spinner
- angular material - How to change Progress spinner color
- angular material - How to align Tabs
- angular material - How to generate Tabs programmatically
- angular material - How to use Slider
- angular material - Tick interval with step in Slider
- angular material - How to use Slider input event
- angular material - How to change Slide toggle checked color
- angular material - How to change Badge position
- angular material - How to use Accordion
- angular material - Action bar inside an Expansion Panel
- angular material - How to use Accordion flat display mode
- angular material - Expansion Panel afterExpand & afterCollapse event
- angular material - Expansion Panel header expanded background color
- angular material - How to use List dense layout mode