@snikh (Snikh) posted a new topic, subject "Can't open page with loading instance in ngOnInit from modal". It read:

   Hi. Someone tell me please that this is a bug and I will create an issue or I something missed in my problem.
    
    I am using ionic.2.0.0-beta.9.
    
    1 . I open modal instance
    [code] 
        public openModal(): Promise<any> {
                let modal = Modal.create(ShowInfoModal);
                return this.navCtrl.present(modal);
            }
        
    [/code]
    
    2 . From modal I try to open other page with **different methods** but got nothing (loading animation **from new page** appear, than dismiss, but page not changed)
    [code] 
        public openBroken1(): Promise<any> {
            return this.navCtrl.setRoot(PaymentMethodPage, {}, {animate: true, direction: 'forward'});
        }
        
         public openBroken2(): Promise<any> {
            return this.viewCtrl.dismiss()
                .then(() => this.navCtrl.setRoot(PaymentMethodPage, {}, {animate: true, direction: 'forward'}));
        }
        
        public openBroken3(): Promise<any> {
            this.viewCtrl.destroy();
            return this.navCtrl.setRoot(PaymentMethodPage, {}, {animate: true, direction: 'forward'});
        }
        
        public openBroken4(): Promise<any> {
            this.viewCtrl.onDestroy(() => this.navCtrl.setRoot(PaymentMethodPage, {}, {animate: true, direction: 'forward'}));
            return this.viewCtrl.dismiss();
        }
        
    [/code]
    
    3 . In page, that can't open I implement ngOnInit method with animation (will be used for animate API response loading. In example simplified but still not work)
    [code] 
        ngOnInit() {
                var loadingInstance = Loading.create({
                    content: 'Loading...'
                });
                this.navCtrl.present(loadingInstance);
        
                setTimeout(() => {
                    loadingInstance.dismiss();
                }, 1000)
            }
        
    [/code]
    
    **Work project with error code placedhere.**
    
    **Or you can clone it with**
    [code] 
        git clone -b ER-3_navigation_animation_error https://github.com/EugeneSnihovsky/ionic2-for-errors.git
        
    [/code]
    
    Thanks in advance.

After which, @snikh (Snikh) added

    Update to ionic2.beta-10 and has the same problem.

Then @mhartington (Mike Hartington) said

    The repo you posted does not have a gulpfile and cannot be built

@snikh (Snikh) replied

    Probably you cloned master branch from my repository. Current issue located at **ER-3_navigation_animation_error** branch and contain all files needed for reproduce problem (I just rechecked).


{'source': 'discourse', 'url': 'https://forum.ionicframework.com/t/cant-open-page-with-loading-instance-in-ngoninit-from-modal/55967', 'title': "Can't open page with loading instance in ngOnInit from modal", 'views': 862, 'has_accepted_answer': False, 'word_count': 277, 'like_count': 0, 'reply_count': 2, 'participant_count': 2, 'posts': 4, 'tags': '', 'author': '@snikh (Snikh)', 'participants': '@snikh (Snikh), @mhartington (Mike Hartington)', 'image_url': [None], 'created_at': '2016-06-27T20:07:36.902Z', 'last_posted_at': '2016-06-28T17:47:23.775Z'}