0

I'm using Angular elements to show a angular page inside an existing Spring-Boot project.

I have an inquire button with which I load data from backend in the component typescript file and then display it on the screen. I'm using two different methods for it :

  1. {{data.name}}
  2. Making a form and then doing form.patchValue()

Both are working fine when I run the angular project in local server but when run the page via the Spring boot project (Angular elements), I'm unable to display data via the first method i.e {{data.name}}.

Any idea why?

Code:-

component.ts

data = {}
populateData(data) {
 this.data = data
}

component.html

<input value="{{data.name}}" />

Harshit Khanna
  • 93
  • 1
  • 1
  • 6

1 Answers1

0

When you're the Angular project with Spring boot, it's rendered as a HTML page not compiled and run as a server with the angular-CLI, that' why it's not working!

Rebai Ahmed
  • 1,509
  • 1
  • 14
  • 21