# Injecting a service

**URL:** <https://forum.ionicframework.com/t/injecting-a-service/39629>\
**Category:** ionic-v3\
**Created:** [December 20, 2015, 11:09pm UTC](https://forum.ionicframework.com/t/injecting-a-service/39629 "2015-12-20T23:09:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigoreal](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@rodrigoreal](https://forum.ionicframework.com/u/rodrigoreal)\
**Post date:** [December 20, 2015, 11:09pm UTC](https://forum.ionicframework.com/t/injecting-a-service/39629/1 "2015-12-20T23:09:57Z")

</div>

Hey guys im trying to inject a service in my app, but im getting some errors.

My service:

`import { Injectable } from 'angular2/angular2'; @Injectable() export class FeedLoad { constructor() { console.log("worked"); } }`

In my app.ts

`import {FeedLoad} from './services/feed-load'; class MyApp { feedLoad: FeedLoad; constructor(feedLoad: FeedLoad) {this.feedLoad = feedLoad} }`

Error:  
EXCEPTION: No provider for FeedLoad! (MyApp -\> FeedLoad)  
STACKTRACE:BrowserDomAdapter.logError @ app.bundle.js:36473ExceptionHandler.call @ app.bundle.js:10780(anonymous function) @ app.bundle.js:19823NgZone.\_notifyOnError @ app.bundle.js:20456errorHandling.onError @ app.bundle.js:20354run @ app.bundle.js:5054(anonymous function) @ app.bundle.js:20369zoneBoundFn @ app.bundle.js:5024p @ app.bundle.js:67(anonymous function) @ app.bundle.js:67Item.run @ app.bundle.js:140drainQueue @ app.bundle.js:110cb @ app.bundle.js:20427arguments.(anonymous function) @ app.bundle.js:5551(anonymous function) @ app.bundle.js:5031run @ app.bundle.js:5051(anonymous function) @ app.bundle.js:20369zoneBoundFn @ app.bundle.js:5024  
app.bundle.js:36473 Error: DI Exception  
at NoProviderError.BaseException [as constructor] (app.bundle.js:10659)  
at NoProviderError.AbstractProviderError [as constructor] (app.bundle.js:11341)  
at new NoProviderError (app.bundle.js:11377)  
at Injector.\_throwOrNull (app.bundle.js:9708)  
at Injector.\_getByKeyDefault (app.bundle.js:9759)  
at Injector.\_getByKey (app.bundle.js:9699)  
at Injector.\_getByDependency (app.bundle.js:9685)  
at Injector.\_instantiate (app.bundle.js:9579)  
at Injector.\_instantiateProvider (app.bundle.js:9568)  
at Injector.\_new (app.bundle.js:9557)

---

<div class="post-metadata">

**Author:** ![rodrigoreal](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@rodrigoreal](https://forum.ionicframework.com/u/rodrigoreal)\
**Post date:** [December 20, 2015, 11:49pm UTC](https://forum.ionicframework.com/t/injecting-a-service/39629/2 "2015-12-20T23:49:41Z")

</div>

Ok, its working now, i forgot to put `providers: [FeedLoad]` inside my `@App({})`.
