|
| 1 | +import {Component} from '@angular/core'; |
| 2 | + |
| 3 | +export interface PeriodicElement { |
| 4 | + name: string; |
| 5 | + position: number; |
| 6 | + weight: number; |
| 7 | + symbol: string; |
| 8 | +} |
| 9 | + |
| 10 | +const ELEMENT_DATA: PeriodicElement[] = [ |
| 11 | + {position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H'}, |
| 12 | + {position: 2, name: 'Helium', weight: 4.0026, symbol: 'He'}, |
| 13 | + {position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li'}, |
| 14 | + {position: 4, name: 'Beryllium', weight: 9.0122, symbol: 'Be'}, |
| 15 | + {position: 5, name: 'Boron', weight: 10.811, symbol: 'B'}, |
| 16 | + {position: 6, name: 'Carbon', weight: 12.0107, symbol: 'C'}, |
| 17 | + {position: 7, name: 'Nitrogen', weight: 14.0067, symbol: 'N'}, |
| 18 | + {position: 8, name: 'Oxygen', weight: 15.9994, symbol: 'O'}, |
| 19 | + {position: 9, name: 'Fluorine', weight: 18.9984, symbol: 'F'}, |
| 20 | + {position: 10, name: 'Neon', weight: 20.1797, symbol: 'Ne'}, |
| 21 | +]; |
| 22 | + |
| 23 | +/** |
| 24 | + * @title Flex table where one column's cells has a greater height than others. |
| 25 | + */ |
| 26 | +@Component({ |
| 27 | + selector: 'table-flex-large-row-example', |
| 28 | + styleUrls: ['table-flex-large-row-example.css'], |
| 29 | + templateUrl: 'table-flex-large-row-example.html', |
| 30 | +}) |
| 31 | +export class TableFlexLargeRowExample { |
| 32 | + displayedColumns: string[] = ['position', 'name', 'weight', 'symbol']; |
| 33 | + dataSource = ELEMENT_DATA; |
| 34 | +} |
0 commit comments