Injectables in Angular2

后端 未结 3 1243
无人及你
无人及你 2021-01-17 12:12

I am playing around with Angular2. As a basis, I used the quickstart project from the angular.io page.

Everything seems to work fine, but as soon as I try to inject

3条回答
  •  情歌与酒
    2021-01-17 12:19

    I had faced the same problem. Below were the resolution:

    1. --emitDecoratorMetadata was missed in tsc
    2. If I was injecting service from same file it was failing, but when I put the service is some other file and when imported that, it started working. probably bug in Angular2 version I was using.

提交回复
热议问题