Permalink
Browse files

Updated WebAPI call to include the response type

  • Loading branch information...
slovely committed Nov 6, 2014
1 parent 4ec67d2 commit 857dfc31e551b2020627a9226f615c4de5f18ae2
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/TypeScriptSample.Web/App/app.ts
@@ -8,8 +8,7 @@ function getPeople() {
$.ajax({
url: "api/person",
method: 'get',
// response could be anything here
}).done((response) => {
}).done((response: Array<TypeScriptSample.Models.Person>) => {
var details = '<ul>';
for (var i = 0; i < response.length; i++) {
details += "<li>" + response[i].Name + "</li>"; //If 'Name' gets changed on the server, this code will fail

0 comments on commit 857dfc3

Please sign in to comment.