Open vinayrdy966 opened 1 week ago
If I replace this exiting code which is causing eval error in evaluator.js
try { // Ensure we handle copied templates from the ejs files. _template = _template.replace(/ctx\./g, ''); return Evaluator.cache[hash] = _lodash["default"].template(_template, Evaluator.templateSettings); } catch (err) { console.warn('Error while processing template', err, _template); }
with this code I am able to resolve this issue. `try { _template = _template.replace(/ctx./g, ''); // Simple manual interpolation without using eval const context = { / context values / }; _template = _template.replace(/{{\s([^{}\s])\s*}}/g, (match, p1) => { return context[p1] || ''; });
Evaluator.cache[hash] = _template; return _template; } catch (err) { console.warn('Error while processing template', err, _template); }`
Steps to Reproduce
angular template: <form-builder class="custom-form-builder" [form]="form" [options]="options"