Hansontable not working in angular 12

Tags: #<Tag:0x00007f2491aa2b90>

I am using angular 12 but Hansontable context and formula not working .

Hi @dinesh.venkatraman

Can you please specify what is your issue exactly? Preferably with code demo.

Hi @adrian.szymanski thanks for your reply.

Here I have attached my code.

Am added contextMenu but not working.


import { NgModule } from ‘@angular/core’;

import { BrowserModule } from ‘@angular/platform-browser’;

import { AppRoutingModule } from ‘./app-routing.module’;

import { AppComponent } from ‘./app.component’;

import { HotTableModule } from ‘@handsontable/angular’;

import { registerAllModules } from ‘handsontable/registry’;


declarations: [



imports: [





providers: [],

bootstrap: [AppComponent]


export class AppModule { }









  <hot-column data="id" [readOnly]="true" title="ID"></hot-column>

  <hot-column data="name" title="Full name"></hot-column>

  <hot-column data="address" title="Street name"></hot-column>


import { Component } from ‘@angular/core’;

import Handsontable from ‘handsontable/base’;

import { ContextMenu } from ‘handsontable/plugins’;


selector: ‘app-root’,

templateUrl: ‘./app.component.html’,

styleUrls: [’./app.component.css’]


export class AppComponent {

title = ‘hansontablesample’;

dataset: any[] = [

{id: 1, name: 'Ted Right', address: 'Wall Street'},

{id: 2, name: 'Frank Honest', address: 'Pennsylvania Avenue'},

{id: 3, name: 'Joan Well', address: 'Broadway'},

{id: 4, name: 'Gail Polite', address: 'Bourbon Street'},

{id: 5, name: 'Michael Fair', address: 'Lombard Street'},

{id: 6, name: 'Mia Fair', address: 'Rodeo Drive'},

{id: 7, name: 'Cora Fair', address: 'Sunset Boulevard'},

{id: 8, name: 'Jack Right', address: 'Michigan Avenue'},



Hi @dinesh.venkatraman

Here’s the same example in jsfiddle and it works just fine with contextMenu enabled. I also tested it locally and again, no problems. What is your environment?


I am using latest angular package locally(only frontend).

currently its working with below code.


Hi @dinesh.venkatraman

The line of code you sent is not connected in any way to the contextMenu option. Can you please send me a package with your local project?


have attached my project code.

As @adrian.szymanski is doing one check for me I wanted to help here.

@dinesh.venkatraman you are missing the


call in the app.module.ts file. You can read more about it here https://handsontable.com/docs/angular-installation/#install-with-npm

Hi @adrian.szymanski @aleksandra_budnik thanks for your help.

Its working perfectly.