HTML code:
#! /usr/bin/python
file = open('/home/results/err.txt')
for line in file.readline():
print line
JSON数据:
<button type="button" (click)="callJoke()">Get joke</button>
<h1>{{msg[1].joke.value}}</h1>
msg是一个来自API响应的对象
答案 0 :(得分:1)
尝试使用角度json
管道:
<h1>{{msg.joke.value | json}} </h1>