AngularJS table循环数据

类别列表

类别编号 类别名称

{{ item.id}}

{{item.displayName}}



Controller

 public ActionResult GetFirstSort()
{
    List firstSorts = new List();
    firstSorts.Add(new FirstSort() {id=1,displayName= "绑定分类1" });
    firstSorts.Add(new FirstSort() { id = 2, displayName = "绑定分类2" });
    firstSorts.Add(new FirstSort() { id = 3, displayName = "绑定分类3" });
    firstSorts.Add(new FirstSort() { id = 4, displayName = "绑定分类4" });
    firstSorts.Add(new FirstSort() { id = 5, displayName = "绑定分类5" });
    return Json(firstSorts);
}

实体类

public class FirstSort
{
    public int id { get; set; }
    public string displayName { get; set; }
}

你可能感兴趣的:(AngularJS table循环数据)