Download Free Trial

Angular4: Update Record property according to input parameters


Hi FlexMonster team!
First of all, congratuations for the excelent product!
I am using flexmonster in a Demo to a customer, and using Angular4. I need to get a variable (an index, for instance), and customize the [report] property according to it. I tried using “” at my ngOnInit() function, but it fails 🙁

<fm-pivot [componentFolder]="''"
dataSource: {
dataSourceType: 'ocsv',
filename: ''
PlaceHolder 1


3 answers

Dmytro Zvazhii Flexmonster March 6, 2018

Hello Frederico, 
Thank you for writing. Please have a look at our Angular4 integration tutorial –, there you can find the reference to the GitHub repository with the sample project. In app.component.ts file you can see the example of using Flexmonster’s setReport() API call. Please find more information about available API calls in our docs –
Let us know if the information above was helpful for you.

Frederico Costa March 6, 2018

Thanks Dmytro!
Your solution is elegant and fast! But as I am using routes (<component>/:<queryid>, for instance: view/1, view/2 etc) to identify the queryId, the onReportComplete Event is only executed when the Component is first entered. Any Ideias on how to solve this?
BTW, I will use you solution at another situation i have, thanks very much!!!
Best Regards,

Tanya Gryshko Flexmonster March 7, 2018

Hello, Frederico,
Our team is really glad that previously suggested solution is useful for your project!
As about customizing the [report] property, please try the following approach:
every time when queryId is changed, please use setReport() API call. setReport() will set new report for the component, i.e. change the [report] property. Check how setReport() should be called and which properties report may contain
Please share your feedback with us! 

Please login or Register to Submit Answer