# Error: No provider for Http!

**URL:** <https://forum.ionicframework.com/t/error-no-provider-for-http/91322>\
**Category:** ionic-v3\
**Created:** [May 22, 2017, 6:09pm UTC](https://forum.ionicframework.com/t/error-no-provider-for-http/91322 "2017-05-22T18:09:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshatbhargava123](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/akshatbhargava123/32/109845_2.png) [@akshatbhargava123](https://forum.ionicframework.com/u/akshatbhargava123)\
**Post date:** [May 22, 2017, 6:09pm UTC](https://forum.ionicframework.com/t/error-no-provider-for-http/91322/1 "2017-05-22T18:09:47Z")

</div>

I made this provider for my app.

```auto
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';

@Injectable()
export class UserProvider {

  Theme: {color: string};
  info: Info;
  
  constructor(public http: Http) {
    console.log('Hello UserProvider Provider');
    this.Theme.color = "primary";
    this.info.name = "test";
    this.info.dob = "xx/xx/xxxx";
    this.info.tob = "XX:XX";
    this.info.email = "test.123@test.com";
    this.info.city = "SomeCity";
  }  

  getInfo() {
    return this.info;
  }

  getTheme() {
    return this.Theme;
  }

}

interface Info {
  name: string;
  dob: string;
  tob: string;
  email: string;
  city: string;
}

```

I am trying to use it here like this:

```auto
  constructor(public navCtrl: NavController, public navParams: NavParams, public user: UserProvider) {
    this.Theme = this.user.getTheme();
  }

```

The app doesn’t load and shows this error:  
[![https://gyazo.com/60cdf39ba455d4424f4cae0ee7668fae](https://i.gyazo.com/60cdf39ba455d4424f4cae0ee7668fae.png)](https://gyazo.com/60cdf39ba455d4424f4cae0ee7668fae)

I tried adding it in the providers list in app.module.ts but then it showed no provider for backend error.  
What do I do? Please thanks.

Regards!

---

<div class="post-metadata">

**Author:** ![nwercto](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nwercto](https://forum.ionicframework.com/u/nwercto)\
**Post date:** [May 22, 2017, 6:24pm UTC](https://forum.ionicframework.com/t/error-no-provider-for-http/91322/2 "2017-05-22T18:24:10Z")

</div>

Hi,

Please see this thread: [Uncaught (in promise): Error: No provider for Http](https://forum.ionicframework.com/t/uncaught-in-promise-error-no-provider-for-http/90998/3)

Could you please confirm that you import HttpModule in app.module.ts?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 22, 2017, 6:24pm UTC](https://forum.ionicframework.com/t/error-no-provider-for-http/91322/3 "2017-05-22T18:24:54Z")

</div>

> [@akshatbhargava123](#):
>
> What do I do?

You search the forums for your error message and find a bunch of threads like [this one](https://forum.ionicframework.com/t/problem-with-http-no-provider-for-connectionbackend/88662) that tell you to take `Http` out of your app module’s `providers`.

---

<div class="post-metadata">

**Author:** ![akshatbhargava123](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/akshatbhargava123/32/109845_2.png) [@akshatbhargava123](https://forum.ionicframework.com/u/akshatbhargava123)\
**Post date:** [May 22, 2017, 6:25pm UTC](https://forum.ionicframework.com/t/error-no-provider-for-http/91322/4 "2017-05-22T18:25:07Z")

</div>

No I didn’t but now I did and it worked! 🙂  
Thank you but could you please explain why I need to do that?

---

<div class="post-metadata">

**Author:** ![cdcarlos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/cdcarlos/32/112196_2.png) [@cdcarlos](https://forum.ionicframework.com/u/cdcarlos)\
**Post date:** [August 7, 2017, 1:31am UTC](https://forum.ionicframework.com/t/error-no-provider-for-http/91322/5 "2017-08-07T01:31:41Z")

</div>

Thanks!! It works for me.
