var createAttendances = function(){
var stud = StudentResource.get(function(data){
$scope.students = data.students;
console.log($scope.students);
});
console.log(stud.students);
console.log($scope.sudents);
};
内部资源get函数它打印出两个对象的数组(这是好的) 以外的资源把它打印出来不确定
它看到螺柱对象但是当我查询到学生PARAMS返回未定义
就像你看到的主要问题是获得$ scope.students或data.students ouside StudentResouce.get FUNC
变种螺柱= StudentResource.get(功能(数据){ 返回data.students; });但我无法查询学生物业 –
是否为你工作? – MeanMan
它返回资源{$ promise:Promise,$ resolved:false}但无法查询学生参数 –