I have a list that looks like this:
<li ng-repeat="document in DisplayDocuments()" ng-class="IsFiltered(document.Filtered)"> <span><input type="checkbox" name="docChecked" id="doc_{{document.Id}}" ng-model="document.Filtered" /></span> <span>{{document.Name}}</span> </li>
I bind this list in my controller so that:
$scope.Documents = $http.get('/Documents/DocumentsList/' + caseId).then(function(result) { return result.data; });
When this is done, I get no results. when I remove the then method, I get three blank lines, making the number OK, but the information is not displayed.
I know that "everthing" else works, since I previously populated the list with jQuery, what am I doing wrong?
Here is the response from the server:
{Id:3f597acf-a026-45c5-8508-bc2383bc8c12, Name:ZZ_BL0164_Skisse BL0164_945111.pdf, Order:1,β¦} {Id:46f51f1f-02eb-449a-9824-8633e8ae7f31, Name:ZB_BL0201_Firmaattest BL0201_945111.pdf, Order:1,β¦} {Id:fddd1979-c917-4b32-9b83-b315f66984ed, Name:ZA_BL0228_Legitimasjonsskjema BL0228_945111.pdf,β¦}
angularjs promise get
ruffen May 31 '13 at 11:05 2013-05-31 11:05
source share