Angular 2 JSONP, injected script did not invoke callback

This question already has an answer here:

  • What is JSONP all about? [duplicate] 7 answers

  • Your code assumes that your server application uses the callback parameter in the returned payload. Your server could use another parameter like c .

    The content of this parameter is used to generated a response payload like below:

    __ng_jsonp__.__req0.finished({ ... })
    

    Otherwise, the callback won't be called within Angular 2 (what you have in your case).

    链接地址: http://www.djcxy.com/p/8346.html

    上一篇: 使用jQuery.getJson获取Web API

    下一篇: Angular 2 JSONP,注入脚本没有调用回调