How to use/import http module?

前端 未结 13 2268
鱼传尺愫
鱼传尺愫 2020-11-27 16:40

I\'ve been playing with Angular 2 Quickstart.

How can I use/import http module in Angular 2?

I\'ve looked at Angular 2 Todo\'s.js, but it doesn\'t use the ht

13条回答
  •  执念已碎
    2020-11-27 17:39

    I believe that now (alpha.35 and 36) is needed to be:

    import {Http} from 'http/http';
    

    Remember to add (since now is a separate file) the reference in your html: https://code.angularjs.org/2.0.0-alpha.36/http.dev.js

提交回复
热议问题