0

I'm trying to convert a javascript library (handsontable) to an angular-dart directive. I know how to call a method on a javascript object:

context.callMethod(r'$', ['#example'])
.callMethod('handsontable', [new JsObject.jsify(options)]);

but don't know how to call 'handsontable' on the element of the directive. The class looks like this for example:

class Spreadsheet {
  dom.Element element;

  Spreadsheet(this.element) {
   }
}

and I want to apply 'handsontable' on the element.

Amir Dezfouli
  • 199
  • 3
  • 10

1 Answers1

1

jQuery can accept an element as parameter. So the following should work :

context.callMethod(r'$', [element])
    .callMethod('handsontable', [new JsObject.jsify(options)]);
Alexandre Ardhuin
  • 71,959
  • 15
  • 151
  • 132