我有下一个Json:
[{
"given": "given3",
"when": "when3",
"then": "then asjdh"
}, {
"given": "given1",
"when": "when1",
"then": "then asjdh"
}, {
"given": "given2",
"when": "when2",
"then": "then asjdh"
}]
当我尝试这样做时:
<ul class="phones">
<li ng-repeat="behavior in behaviors" >
<p>GIVEN: {{behavior.given}}</p>
<p>WHEN: {{behavior.when}}</p>
<p>THEN: {{behavior.then}}</p>
</li>
</ul>
我有下一个错误:
Error: p.then is not a function
anonymous@file:/~/app/lib/angular/angular.js:6531
lex/readIdent/token.fn<@file:/~/app/lib/angular/angular.js:5914
$interpolate/fn@file:/~/app/lib/angular/angular.js:4931
Scope.prototype.$digest@file:/~/app/lib/angular/angular.js:7889
Scope.prototype.$apply@file:/~/app/lib/angular/angular.js:8097
done@file:/~/app/lib/angular/angular.js:9111
completeRequest@file:/~/app/lib/angular/angular.js:9274
createHttpBackend/</xhr.onreadystatechange@file:/~/app/lib/angular/angular.js:9245
"
好吧,我不太了解如何从角度解析 json 中的信息,但我认为“then”是保留字,或者类似的东西?
有什么建议吗?