Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Last active June 1, 2023 18:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetanelBasal/60906b2f718dddf351b083a643bc49d1 to your computer and use it in GitHub Desktop.
Save NetanelBasal/60906b2f718dddf351b083a643bc49d1 to your computer and use it in GitHub Desktop.
export class CopyAction extends Action {
getLabel() {
return 'Copy';
}
invoke() {
inject(CopyService).copy();
}
}
@Component({
standalone: true,
imports: [GridActionsComponent],
template: `
<grid-actions [actions]="actions"></grid-actions>
`
})
export class GridCellComponent {
actions = [new CopyAction()];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment