angular 10
export const comService = Inject(ComProfilService);
export const ConfigEmploye: AcTableColumn[] = [
{
key: 'see',
buttons: [
{
label: '<i class="fa fa-eye"></i>',
action: (element, column) => {
comService.emit({code:'', description: '', label:''} as IProfil);
}
}
],
}
];
emit(profil: IProfil) {
this.profilSelectedEvent$.next(profil);
}
no error at compile time but at runtime
core.js:4197 ERROR TypeError: comService.emit is not a function
at Object.action (config-employe.ts:28:22)
Is this the right way to do it? Or is there another technique?