I am facing the same issue as described in Angular 2 - AOT - Calling function 'ChartModule', function calls not supported
ERROR in Error encountered resolving symbol values statically. Calling function 'ChartModule'. function calls are not supported. Consider replacing the function or lambda with a reference to an exported function.
But in my case, i have 4 require statements and I couldn't get it work the same way the answer has been given for the above question.
I tried like,
export function highchartsFactory() {
const hc = require('highcharts');
const hm = require('highcharts/highcharts-more');
const h3d = require('highcharts/highcharts-3d');
const sg = require('highcharts/modules/solid-gauge');
hm(hc);
h3d(hm);
sg(h3d);
return hc;
}
Could you please point me to what I am doing wrong and how I can solve this issue?
Thanks.