Restangular: Empty array using $object


I display my data in a table (smart-table) and everything is working well but in my angular code, when I try to get my “topicList” it’s return an empty array. there is my code and thank you in advance.

$scope.topicList= Restangular.all("topic").getList().$object;
    for(var k in $scope.topicList) {
    if($scope.topicList[k] === "")


Restangular.all('topic').getList().then(function(response) {
  $scope.topicList = response;

After you’ve assigned the topicList then you can do your bits and pieces.

Answered By – rrd

Answer Checked By – Dawn Plyler (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.