# Ionic not pushing to page neither rendering

**URL:** <https://forum.ionicframework.com/t/ionic-not-pushing-to-page-neither-rendering/127788>\
**Category:** ionic-v3\
**Created:** [April 13, 2018, 8:45am UTC](https://forum.ionicframework.com/t/ionic-not-pushing-to-page-neither-rendering/127788 "2018-04-13T08:45:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoseM](https://avatars.discourse-cdn.com/v4/letter/j/5fc32e/32.png) [@JoseM](https://forum.ionicframework.com/u/JoseM)\
**Post date:** [April 13, 2018, 8:45am UTC](https://forum.ionicframework.com/t/ionic-not-pushing-to-page-neither-rendering/127788/1 "2018-04-13T08:45:54Z")

</div>

I’m calling this function in a service to go to another page. For example, after clicking in notification push message that I receive in app.component.ts, from a modal or whatever.

It works in the whole navigation of the app but sometimes push notificactions doesn’t redirect to the detail page.

```auto
import {Injectable} from "@angular/core";
import {NavController} from "ionic-angular";

@Injectable()

constructor() {
}

initRootNav(rootNav: NavController) {
    console.log(rootNav);
    this.rootNav = rootNav;
}

go(page: string, params?: any) {
    this.rootNav.push(page, params)
}

```

The page does ‘push’ because I can see all the info in console.log but view is not rendered. Uusually works the first time and never again.

I can see all logs but I am still in page1/modal1/whatever

```auto
ionViewDidLoad() {
    console.log('ionViewDidLoad');
}

ionViewWillEnter() {
    console.log('ionViewWillEnter');
    this.getData(); / does stuff
}

ionViewDidEnter() {
    console.log('ionViewDidEnter');
}

ionViewCanEnter() {
    console.log('ionViewCanEnter');
}

ionViewWillLeave() {
    console.log('ionViewWillLeave');
}

ionViewDidLeave() {
    console.log('ionViewDidLeave');
}

```

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [April 13, 2018, 9:39am UTC](https://forum.ionicframework.com/t/ionic-not-pushing-to-page-neither-rendering/127788/2 "2018-04-13T09:39:24Z")

</div>

It’s correct you can’t do that respectively you can’t use the `navigation` or other components like `alert` etc. in providers/service

You could only use such components in your `pages` or `app.component.ts`

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:40pm UTC](https://forum.ionicframework.com/t/ionic-not-pushing-to-page-neither-rendering/127788/3 "2021-07-19T21:40:53Z")

</div>

Closed on July 19, 2021, 9:40pm UTC


