-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ionViewDidLoad() not working in Modal #8414
Comments
same issue here. |
+1 |
I have the same problem. As a work-around until this is fixed I put my setup logic for the modal in the constructor instead. |
+1 |
Hello all, i am going to close this issue as a duplicate of #8449. Thanks for using Ionic! |
+1 |
@jgw96 I don't think it is the same issue. this issue is about |
Here is my work around: Function to Create Modal
Page Loaded in Modal
|
@mattroth that work around didn't work for me.... I need to access nativeElement from a @ViewChild so my guess is that the elements are loaded yet when the constructor is fired Example: @ViewChild('autocompleteStart') autoCompleteStart; ionViewDidLoad(): void { I'm using the Autocomplete Google API. Actually just figured out this workaround:
|
My "workaround" is simple! :-) i have create a function and insert inside the constructor. Problem Solved! |
I found that ionViewLoaded = false;
ionViewDidEnter() {
if (!this.ionViewLoaded) {
this.ionViewLoaded = true;
this.ionViewDidLoad();
}
} Hope this will help someone. |
Note: If you are having problems formatting your issue please refer to this article on using markdown in Github:
https://guides.github.com/features/mastering-markdown/
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
Short description of the problem:
ionViewDidLoad() not executing in Modal
What behavior are you expecting?
I'm expecting a log from the Push Page 'Hello Push Page'
Steps to reproduce:
`
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
`
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Which Ionic Version? 1.x or 2.x
Ionic Framework Version: 2.0.0-rc.0
Plunker that shows an example of your issue
Run
ionic info
from terminal/cmd prompt: (paste output below)Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.9.0
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v6.7.0
Xcode version: Xcode 8.0 Build version 8A218a
The text was updated successfully, but these errors were encountered: