🍉 Meet Flexmonster Pivot Table & Charts 2.9.Check out all hot features!
Get Free Trial

Equivalent of ‘flexmonster’ object in Angular/Typescript

Devesh asked on August 6, 2019

Hi team,
As I can see in the docs,the object ‘flexmonster’ has method like save, load, setReport. But I am not sure how to get ‘flexmonster’ Object in angular/typescript. And how to use it to call these methods. e.g.

flexmonster.save({  ////how to get 'flexmonster object in angular/ts
    filename: 'myreport.json', 
    destination: 'file'

Please help. Thanks in advance

2 answers

Ian Sadovy Ian Sadovy Flexmonster August 7, 2019

Hello Devesh,
Thank you for the question.
You can access all Flexmonster API methods by creating a reference in the Angular.

// .html
<fm-pivot #pivot ... />

// .ts
@ViewChild('pivot', {static: false}) pivot: FlexmonsterPivot;

// access to API
this.pivot.flexmonster.save(); // load(), setReport(), etc.

Also, here is the sample on our GitHub: https://github.com/flexmonster/pivot-angular/blob/master/src/app/app.component.ts (see lines 51-52).
Please let us know if you have any further questions.

Devesh August 9, 2019

Thanks Ian.

Please login or Register to Submit Answer