阅读背景:

Angular 2组件指令不与服务一起使用

来源:互联网 

I am a beginner in angular 2 and I am building my first App whilst following a Pluralsight Course. I am using TypeScript. I have the a particular component (named: property-detail.component.ts) in which I am trying to reference the directives from a service (property.service.ts). I am registering the service in the root module and am injecting the services into the component using the "contructor" method. In the one component (property-list.component.ts) i call a list of products and this works fine. I then try call the same service in the (property-detail.component.ts) in which i only want to show details of a single property, but when i run the app, i get the following errorI am a beginner in angular 2 and I am building




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: