0

Ive just started using AG Grid and Im having a problem with the demos

** see link below

the example references ICellRendererAngularComp which it says is located in

ag-grid-community/angular

but I cant find it. Heres the typescript code, can anyone shed any light on this ? Ive got the grid installed correctly on my system (Angular 11) but I cant figure out where this comp is

import { ICellRendererAngularComp } from '@ag-grid-community/angular';
import { ICellRendererParams } from '@ag-grid-community/core';
import { Component } from '@angular/core';

@Component({
  selector: 'medal-component',
  template: `<span>{{ this.displayValue }}</span>`,
})
export class MedalCellRenderer implements ICellRendererAngularComp {
  public displayValue!: string;

  agInit(params: ICellRendererParams<IOlympicData, number>): void {
    this.displayValue = new Array(params.value).fill('#').join('');
  }

  refresh(params: ICellRendererParams) {
    return false;
  }
}

I get an error 'Module ag-grid-community has no exported member ICellRendererAngularComp' and @ag-grid-community/angular doesnt exist only @ag-grid-community exists

looks like the plunket link doesnt work, Ive accessed the samples from this url

AG Grid samples

misuk
  • 133
  • 1
  • 15
  • I think the link you provided is broken (?) –  Aug 04 '22 at 14:04
  • thanks for the heads up, Ive added the actual samples page, looks like the plunket url doesnt point to the correct place – misuk Aug 04 '22 at 14:37

1 Answers1

0

Ok, managed to solve this myself. Im using the legacy version of ag-grid, so the import should be this

import { ICellRendererAngularComp } from 'ag-grid-angular-legacy';

im using angular 11 so I have to use the legacy version, angular 12 and up uses the standard angular grid

misuk
  • 133
  • 1
  • 15