Angular 2 service not being injected into component
问题 I have a service defined in my Angular2 (2.0.0-beta.0) application. It's something like this: import {Injectable} from "angular2/core"; @Injectable() export class MyService { constructor() { } getSomething() { return 'something'; } } I have it listed in my bootstrap() function in my main app file so that it should be made available to my code in general: bootstrap(App, [MyService, SomeOtherService, ROUTER_DIRECTIVES[); Sometimes I can't use the service in a component, even though I have