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}但無法查詢學生參數 –