# EXCEPTION: No provider for UserData! (LoginPage -\> UserData)

**URL:** <https://forum.ionicframework.com/t/exception-no-provider-for-userdata-loginpage-userdata/47913>\
**Category:** ionic-v3\
**Created:** [March 30, 2016, 4:19pm UTC](https://forum.ionicframework.com/t/exception-no-provider-for-userdata-loginpage-userdata/47913 "2016-03-30T16:19:40Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![infoproducts](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/infoproducts/32/100372_2.png) [@infoproducts](https://forum.ionicframework.com/u/infoproducts)\
**Post date:** [April 7, 2016, 9:25am UTC](https://forum.ionicframework.com/t/exception-no-provider-for-userdata-loginpage-userdata/47913/23 "2016-04-07T09:25:27Z")

</div>

Unfortunately it seems like it is indeed by design and I’m not holding my breath hoping for it to change.

There’s an ongoing discussion about it here: [https://github.com/angular/angular/issues/5622](https://github.com/angular/angular/issues/5622)

A sort of workaround to decouple service from inner dependencies could be to export a constant array (export constant SOME\_SERVICE = [SomeService, OtherServiceUsedBySomeService …] and add that to component’s providers array instead.

I guess that is the same pattern already used in Angular2 when considering HTTP\_DIRECTIVES etc

---

_[View the full topic](https://forum.ionicframework.com/t/exception-no-provider-for-userdata-loginpage-userdata/47913)._
