angularjs - jsonp call not returning data in angular? -
i trying return data through jsonp call angular application. tried workaround: angular $resource jsonp not working. did replacing webapi link , callback 'blaat' not triggered? fiddle:http://jsfiddle.net/qc4wk/5/ fragment of code:
$http({ method: "jsonp", params: { callback: "blaat" }, url: "http://localhost:7234/api/person", isarray: true })
my apicontroller looks like:
public class personcontroller : apicontroller { public list<person> get() { person person1 = new person() { name = "mark", id = 1 }; person person2 = new person() { name = "ed", id = 2 }; person person3 = new person() { name = "fred", id = 3 }; list<person> lijst = new list<person>(); lijst.add(person1); lijst.add(person2); lijst.add(person3); return lijst; } }
how can wrap callback on serverside can use in angularrequest?
Comments
Post a Comment