Вам нужно импортировать службу в файл app.module.ts.
import { MyService } from './myservice.service'; @NgModule({ providers: [ MyService ] })