को restangular getList परिणाम नियत तो ऐसा लगता है कि उदाहरण में आप यह कर सकते हैं:
App.controller('ProjectListCtrl', ['$scope', 'Restangular', function($scope, Restangular) {
$scope.projects = Restangular.all('project/').getList();
}]);
लेकिन यह मेरे लिए काम नहीं करता। मैं एनजी-दोहराने परियोजनाओं में परियोजना और गुंजाइश को देखते हैं, मैं देख रहा हूँ:
{
projects: {
then: null
catch: null
finally: null
call: null
get: null
restangularCollection: true
push: null
}
}
कौन सा एक संयुक्त राष्ट्र का समाधान वादा वस्तु सही तरह लग रहा है?
यह ठीक काम करता है, लेकिन अधिक वर्बोज़ है:
lgtApp.controller('ProjectListCtrl', ['$scope', 'Restangular', function($scope, Restangular) {
Restangular.all('project/').getList().then(function(projects){
$scope.projects = projects;
});
}]);
क्या मैं कुछ याद आती है? यह डॉक्स में है:
$scope.owners = house.getList('owners')
कोई फर्क नहीं करना चाहिए, लेकिन ऐसा होता है जब मैं लहर क्रोम प्लगइन में एक phonegap ऐप का परीक्षण कर रहा हूँ।
यह होना चाहिए स्वीकार किए जाते हैं जवाब – yar1
इस के साथ बहुत भाग्य होने लगती है। यह एक खाली सरणी लौट रहा है - http://stackoverflow.com/questions/27844177/restangular-data-getting-into-scope-for-a-list – Horse