No provider for Response in angular 2 even thought i have added providers in component?

前端 未结 2 384
暗喜
暗喜 2021-01-28 02:51

Error: This is the error I am getting even thought I have added provider to mine component.I am unable to get what\'s the mine error for. here are mine all file app.component.t

2条回答
  •  醉酒成梦
    2021-01-28 03:09

    Response depends on ResponseOptions and ResponseOptions is not designed in a way it can be injected easily. See https://github.com/angular/angular/blob/bb8976608db93b9ff90a71187608a4390cbd7a07/modules/%40angular/http/src/base_response_options.ts#L57

    If you are injecting Response somewhere then you're probably doing something that is not supposed to work this way.

提交回复
热议问题