I have a ejb file and I'm rendering that file from Node.js Express API. I am trying to render that response in Angular. But I'm getting empty page while rendering the response. I have consoled the response where I could see the ejb code as response.
Code
Node.js
app.set('view engine', 'ejs')
app.get('/',function(req,res){
res.render('index')
});
Angular
Service
getHomepage(): Observable<any> {
return this.http.get('http://localhost:3000', { responseType: 'text' });
}
TS
ngOnInit() {
this.userService.getHomepage().subscribe(
(data:(any)) => this.library = data
);
}
HTML
<div [innerHTML]="library"></div>