AngularJS OnsenUI reload parent page on nav.popPage() in child page

前端 未结 3 2014
深忆病人
深忆病人 2020-12-18 08:43

I\'m calling a function on ng-init and in that page I\'m pushing a new page to the pageStack of navigator on a button click. And in the child page I\'m popping the current p

3条回答
  •  佛祖请我去吃肉
    2020-12-18 08:49

    You can use the new pageReplace() that comes with the new Onsen UI 1.3.0. You can pass it to the callback of popPage() like this:

    $scope.popAndReplace = function() {
      $scope.nav.popPage({onTransitionEnd : function() {
         $scope.nav.replacePage('page1.html', { animation : 'none' } );
      }})
    };
    

    Working here: http://codepen.io/frankdiox/pen/gbJGZw

    Hope it helps!

提交回复
热议问题