Angular js JSON数据未从Controller绑定

时间:2015-10-28 11:45:13

标签: angularjs wcf

我正在尝试将Json数据绑定到dropdownlist ..我写了一个服务来获取数据

var Divisions = assigningStudentService.GetDivisionsByGradeId(gradeId).Select(x => x.Divisions.Select(y => new  { y.DivisionID, y.Name }));

我能够从服务中获取Json数据,但我无法将其绑定到下拉列表。我用了代码

ng-options="grades.GradeNo for grades in Grades track by grades.GradeID" ng-model="grades">

我的杰森:

[  
    [  
        {  
            "DivisionID":1,
            "Name":"A"
        },
        {  
            "DivisionID":1014,
            "Name":"C"
        },
        {  
            "DivisionID":1019,
            ‌​"Name":"zaza"
        },
        {  
            "DivisionID":1020,
            "Name":"D"
        }
    ]
]

0 个答案:

没有答案