# Making Http GET Data Available Globally

**URL:** <https://forum.ionicframework.com/t/making-http-get-data-available-globally/85652>\
**Category:** ionic-v3\
**Created:** [April 6, 2017, 3:38pm UTC](https://forum.ionicframework.com/t/making-http-get-data-available-globally/85652 "2017-04-06T15:38:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lincolnberryiii](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lincolnberryiii/32/92469_2.png) [@lincolnberryiii](https://forum.ionicframework.com/u/lincolnberryiii)\
**Post date:** [April 6, 2017, 3:38pm UTC](https://forum.ionicframework.com/t/making-http-get-data-available-globally/85652/1 "2017-04-06T15:38:01Z")

</div>

My Ionic 2 App requires me to pull data via Http GET when the app initializes, and I need the resulting data to be available globally across several subsequent pages without having to make the Http get request with each new page load. What’s the best way to handle this situation? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ashley\_shookhye](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@ashley\_shookhye](https://forum.ionicframework.com/u/ashley_shookhye)\
**Post date:** [April 6, 2017, 4:56pm UTC](https://forum.ionicframework.com/t/making-http-get-data-available-globally/85652/2 "2017-04-06T16:56:51Z")

</div>

Hello,

You can use an angular service with a variable, setter and getter. In each page, inject the service and use the getter function to get the data.

Ashley

---

<div class="post-metadata">

**Author:** ![lincolnberryiii](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lincolnberryiii/32/92469_2.png) [@lincolnberryiii](https://forum.ionicframework.com/u/lincolnberryiii)\
**Post date:** [April 7, 2017, 12:00pm UTC](https://forum.ionicframework.com/t/making-http-get-data-available-globally/85652/3 "2017-04-07T12:00:32Z")

</div>

Thanks, @ashley_shookhye! I’m able to successfully create an angular service that injects into the pages I need. The problem is that my Http request fires each time it’s injected.

Perhaps a better way to ask this is: Let’s say I’m using Ionic’s `sidemenu` template. If I were to move my Http request to the `app.component.ts` default `MyApp` class, how could I access the variable that holds the requested data from other subsequent pages without firing the Http request each time?

---

<div class="post-metadata">

**Author:** ![sanjib\_dev](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sanjib\_dev](https://forum.ionicframework.com/u/sanjib_dev)\
**Post date:** [April 7, 2017, 1:03pm UTC](https://forum.ionicframework.com/t/making-http-get-data-available-globally/85652/4 "2017-04-07T13:03:59Z")

</div>

use ionic2 local storage and store the data in initialize hook so that it only fired 1st time. then retrieve it from storage.

---

<div class="post-metadata">

**Author:** ![lincolnberryiii](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lincolnberryiii/32/92469_2.png) [@lincolnberryiii](https://forum.ionicframework.com/u/lincolnberryiii)\
**Post date:** [April 7, 2017, 8:33pm UTC](https://forum.ionicframework.com/t/making-http-get-data-available-globally/85652/5 "2017-04-07T20:33:19Z")

</div>

Thank you very much, @sanjib_dev! This was exactly the solution I was looking for. Now my `*ngFor` lists populate instantly. Cheers!
