更新时间:2021-08-01 05:46:09
您可以使用 json管道一个>.在您的模板中:
You can use the json pipe. In your template:
<pre>Data Obtained is: {{ data | json }}</pre>
此外,您还必须将data
属性的类型更改为any
而不是string
.
Also you have to change the type of your data
property to any
instead of string
.