我用ajax请求出来的数据,打算用{{}}绑定显示在页面上,但是有些能显示,有些不能显示,为什么啊?
看看controller里面的代码
success(function(results){
var resultsgd = [];
for(var k = 0; k < results.length; k++) {
resultsgd.push(results[k]);
}
$scope.items = resultsgd;
获取出来的数据结构是这样的
Can_web_buy:"Y"
Control_day:29
Day_diff:"0"
From_station:"北京南"
From_station_type:"起点"
From_time:"06:43"
Lowest_price:"553.00"
Lowest_seatname:"二等座"
Sale_time:"12:30"
Seats:(3) [{…}, {…}, {…}]
To_station:"上海虹桥"
To_station_type:"终点"
To_time:"12:39"
Train_no:"240000G1010D"
Train_number:"G101"
Use_time:"5小时56分钟"
seats里面的数据是这样的
0:{Seat_price: 553, Seat_name: "二等座", Seat_bookable: 1, Seat_yupiao: 99, IsView: true, …}
1:{Seat_price: 933, Seat_name: "一等座", Seat_bookable: 1, Seat_yupiao: 30, IsView: true, …}
2:{Seat_price: 1748, Seat_name: "商务座", Seat_bookable: 0, Seat_yupiao: 0, IsView: true, …}
我在视图里面的绑定
<div seat="SK1805-201" ng-repeat="Seat in items.Seats track by $index">
<span>{{Seat.OtherName}}</span>
<small> ¥ </small><b>{{Seat.seat_price}}</b>
<strong class="">{{Seat.Seat_yupiao}}张</strong>
</div>
但是加载后,{{Seat.seat_price}}不显示,请各位大神支支招
seat_price 的's'不是大写的么