|
| 1 | +import { Component } from '@angular/core'; |
| 2 | +import { RouterOutlet } from '@angular/router'; |
| 3 | +import { ListBoxComponent, ListBoxModule, CheckBoxSelection } from '@syncfusion/ej2-angular-dropdowns'; |
| 4 | +import { ButtonComponent } from '@syncfusion/ej2-angular-buttons' |
| 5 | + |
| 6 | +ListBoxComponent.Inject(CheckBoxSelection); |
| 7 | + |
| 8 | +@Component({ |
| 9 | + selector: 'app-root', |
| 10 | + standalone: true, |
| 11 | + imports: [RouterOutlet, ListBoxModule ], |
| 12 | + templateUrl: './app.component.html', |
| 13 | + styleUrl: './app.component.css' |
| 14 | +}) |
| 15 | +export class AppComponent { |
| 16 | + public data: { [key: string]: Object }[] = [ |
| 17 | + { id: 'game1', sports: 'Badminton' }, |
| 18 | + { id: 'game2', sports: 'Cricket'}, |
| 19 | + { id: 'game3', sports: 'Football'}, |
| 20 | + { id: 'game4', sports: 'Golf'}, |
| 21 | + { id: 'game5', sports: 'Tennis'}, |
| 22 | + { id: 'game6', sports: 'Basket Ball'}, |
| 23 | + { id: 'game7', sports: 'Base Ball'}, |
| 24 | + { id: 'game8', sports: 'Hockey'}, |
| 25 | + { id: 'game9', sports: 'Volley Ball'} |
| 26 | +]; |
| 27 | + |
| 28 | +public fieldSettings = { |
| 29 | + text: "sports", |
| 30 | + value: "id" |
| 31 | + } |
| 32 | + |
| 33 | + public selection = { mode: "Single", showCheckbox: false } |
| 34 | +} |
0 commit comments