# Error in :0:0 caused by: No provider for NavParams!

**URL:** <https://forum.ionicframework.com/t/error-in-0-0-caused-by-no-provider-for-navparams/80474>\
**Category:** ionic-v3\
**Created:** [February 21, 2017, 11:11pm UTC](https://forum.ionicframework.com/t/error-in-0-0-caused-by-no-provider-for-navparams/80474 "2017-02-21T23:11:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![imenou](https://avatars.discourse-cdn.com/v4/letter/i/49beb7/32.png) [@imenou](https://forum.ionicframework.com/u/imenou)\
**Post date:** [February 21, 2017, 11:11pm UTC](https://forum.ionicframework.com/t/error-in-0-0-caused-by-no-provider-for-navparams/80474/1 "2017-02-21T23:11:03Z")

</div>

Hi guys,  
I got this error when pushing params from my login.ts to /app/app.component.ts  
which is like this:  
`this.navCtr.push(MyApp,{user: NativeStoraget.getItem("user");`  
and in the MyApp side in the controller I read it with:  
`this.user= navParams.get('user');`  
Actually I pass NavParams on the controllerand this error  
`Error in :0:0 caused by: No provider for NavParams!`  
has been throwing during runnig  
Sorry guys for my english, it isn’t well enough.  
thx for any comment

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [February 22, 2017, 7:07am UTC](https://forum.ionicframework.com/t/error-in-0-0-caused-by-no-provider-for-navparams/80474/2 "2017-02-22T07:07:46Z")

</div>

> [@imenou](#):
>
> this.navCtr.push(MyApp,{user: NativeStoraget.getItem(“user”);

a missing closing curly bracket?

---

<div class="post-metadata">

**Author:** ![imenou](https://avatars.discourse-cdn.com/v4/letter/i/49beb7/32.png) [@imenou](https://forum.ionicframework.com/u/imenou)\
**Post date:** [February 22, 2017, 12:35pm UTC](https://forum.ionicframework.com/t/error-in-0-0-caused-by-no-provider-for-navparams/80474/3 "2017-02-22T12:35:15Z")

</div>

yes, here I forget the } but on the code, there’r no error

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [February 22, 2017, 1:38pm UTC](https://forum.ionicframework.com/t/error-in-0-0-caused-by-no-provider-for-navparams/80474/4 "2017-02-22T13:38:16Z")

</div>

could you show us, how you inject newParams service?

---

<div class="post-metadata">

**Author:** ![imenou](https://avatars.discourse-cdn.com/v4/letter/i/49beb7/32.png) [@imenou](https://forum.ionicframework.com/u/imenou)\
**Post date:** [February 22, 2017, 1:45pm UTC](https://forum.ionicframework.com/t/error-in-0-0-caused-by-no-provider-for-navparams/80474/5 "2017-02-22T13:45:10Z")

</div>

```
import { NavController, NavParams } from 'ionic-angular';

private param1: any;
  constructor(public navCtrl: NavController, public navParams: NavParams){
    this.param1=navParams.get('i');
    console.log(this.param1);

    }

```

this actually work like a charm on the user.ts but not on app.component.ts  
so how can’ I do this. Because I like to display the pctiure of the connected user on the sideMenu wich is on the app.html uder app/ folder  
thx you

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [February 22, 2017, 1:48pm UTC](https://forum.ionicframework.com/t/error-in-0-0-caused-by-no-provider-for-navparams/80474/6 "2017-02-22T13:48:09Z")

</div>

the app component has no router --\> so is not part of the navigation stack.

The app-component is a component and not a page --\> check your index.html there you will find the app.component selector as an element.

Use services with Observables/Subjects to inform other parts about changes.

---

<div class="post-metadata">

**Author:** ![imenou](https://avatars.discourse-cdn.com/v4/letter/i/49beb7/32.png) [@imenou](https://forum.ionicframework.com/u/imenou)\
**Post date:** [February 22, 2017, 2:01pm UTC](https://forum.ionicframework.com/t/error-in-0-0-caused-by-no-provider-for-navparams/80474/7 "2017-02-22T14:01:08Z")

</div>

Sorry, I’m new with ionic2. so I don’t know how to use services for this task, can you please give me an exemple or a tutorial about this
