Outline
- Fundamentals of ag-Grid with Angular
- Fundamentals of ag-Grid with Angular: Data
- Fundamentals of ag-Grid with Angular: Columns
- Fundamentals of ag-Grid with Angular: Filtering
- Fundamentals of ag-Grid with Angular: Rows
- Fundamentals of ag-Grid with Angular: Styling
- Fundamentals of ag-Grid with Angular: Cell Editing
- Fundamentals of ag-Grid with Angular: Custom Components
Outline
- Fundamentals of ag-Grid with Angular
- Fundamentals of ag-Grid with Angular: Data
- Fundamentals of ag-Grid with Angular: Columns
- Fundamentals of ag-Grid with Angular: Filtering
- Fundamentals of ag-Grid with Angular: Rows
- Fundamentals of ag-Grid with Angular: Styling
- Fundamentals of ag-Grid with Angular: Cell Editing
- Fundamentals of ag-Grid with Angular: Custom Components
Goals
- Develop a
CurrencyRendererComponent
that uses Angular'sCurrencyPipe
to format a currency value. - Implement the
agInit()
lifecycle method to access the cell'svalue
via theICellRendererParams
object. - Implement the
refresh()
lifecycle method. First, we'll returnfalse
and allow ag-Grid to create and destroy the renderer component when the cell value changes. Then, we'll let Angular's change detection handle re-rendering when the cell value changes and returntrue
. - Register the custom component using the
frameworkComponents
input binding on the<ag-grid-angular>
component. - Use the newly created
currentRenderer
for thecellRenderer
property in the column definition.