【发布时间】:2016-09-12 23:12:06
【问题描述】:
我正在尝试制作一个滑块样式页面,该页面根据我给定的 json 文件呈现动态数据。
在我的控制器中:
constructor(navController) {
this.navController = navController;
this.populateHistory();
}
populateHistory(){
console.log("populating!");
var tests = '{[{"name":"jack"},{"name":"john"},{"name":"joe"}]}';
}
在我的 html 中:
<ion-slides>
<ion-slide ng-repeat="test in tests">
{{test.name}}
</ion-slide>
</ion-slides>
即使您触发了 console.log,该页面也不会出现。我猜我的 html 中有一些我没有注意到的语法错误。我必须在 Ionic 2 中使用 collection-repeat 吗?
【问题讨论】:
标签: javascript ionic-framework angular ionic2