@fishka/angular-material
v0.1.0
Published
Angular Material-dependent shared UI components/directives
Maintainers
Readme
@fishka/angular-material
Angular Material-dependent shared UI components/directives. Split from @fishka/angular so projects
that don't need Material never pull in
@angular/material/@angular/cdk as peer dependencies — mirrors how Angular itself splits @angular/cdk
(headless) from @angular/material (opinionated). Not yet published.
Mat-table typing helpers
*matRowDef/*matCellDef type their row as any by default. MatRowDefTypedByDirective /
MatCellDefTypedByDirective are drop-in replacements (same selector, extend the Material class,
re-provide CdkRowDef/CdkCellDef) that add a typedBy binding fixing the row type:
<table mat-table [dataSource]="rows">
<ng-container matColumnDef="label">
<td mat-cell *matCellDef="let row; typedBy: rows">{{ row.label }}</td>
</ng-container>
<tr mat-row *matRowDef="let row; columns: columns; typedBy: rows"></tr>
</table>imports: [MatTableModule, MatCellDefTypedByDirective, MatRowDefTypedByDirective],Import them alongside MatTableModule (not instead of it) — the typed directives only replace
CdkRowDef/CdkCellDef resolution via useExisting; the rest of the table (MatTable,
MatColumnDef, MatHeaderRowDef, ...) still comes from MatTableModule.
Development
npm run build—ng-packagrbuild intodist/(Angular Package Format).npm test— Jest +jest-preset-angular(TestBed) component tests.npm run lint,npm run format— eslint + prettier.npm run typecheck—tsc --noEmit.
Published by the author separately (npm run release).
