Here is a plunker that demonstrates a header component like what you want. I took it from the examples on the docs for ag-grid. Take a look mostly at header.component.html, that's where the magic is at.
I think the only confusing part would be when you create the HeaderComponent:
export class HeaderComponent implements IHeaderAngularComp {
public color: string = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
public params: MyParams;
private elementRef: ElementRef;
...
//You will need to get the params from agInit so that you can access
//the value for each column
agInit(params: MyParams): void {
this.params = params;
}
}
Please check on their docs for more explanation, they get better every day