Closed socreative closed 4 months ago
You have to fetch and render your EJS code in Angular, as of what I remember of the time when I used it.
And, this will be achieved using HttpClient
from '@angular/common/http' and Component
& OnInit
from '@angular/core'
i was just thinking i could have the template as a string and use the EJS render() method, but i cant even import EJS to use it. it references node's fs and process which dont exist on the frontend
@socreative browser-compatible builds can be downloaded from https://github.com/mde/ejs/releases/
I am looking to use a JS based templating on the front-end and I used ejs with Node but is there a way to use EJS on the frontend? I am getting TypeScript compiler errors with trying to use in in Angular as ejs relies on node processes.