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
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.
Regards,
Ian
Thanks Ian.