angular-ui / ui-router

The de-facto solution to flexible routing with nested views in AngularJS
http://ui-router.github.io/
MIT License
13.56k stars 3.01k forks source link

nested routes problem #3690

Closed epworthhh closed 6 years ago

epworthhh commented 6 years ago

Hi all.

I have something like this:

.state('gift', { 
        url: '/regala',
        templateUrl: 'app/components/gift/gift.html',
        controller: 'GiftCtrl',
        controllerAs: 'giftVm',
      })
      .state('gift.fail', {
        url: '/error',
        templateUrl: 'app/components/gift/fail/gift-fail.html',
        controller: 'GiftFailCtrl',
        controllerAs: 'paymentVm',
        params: {
          billingData: null
        }
      })
      .state('gift.success', {
        url: '/confirmacion?token&paymentId&PayerID',
        templateUrl: 'app/components/gift/success/gift-success.html',
        controller: 'GiftSuccessCtrl',
        controllerAs: 'successVm'
      })

when I do $state.go('gift.success') from another child controller inside GiftCtrl (<div ng-if="thirdStep" class="wrapper my-fade-animation" ng-include="'app/components/gift/step3/gift-payment.html'" ng-controller="GiftPaymentCtrl as paymentVm"></div>), when GiftSuccessCtrl is called, GiftPaymentCtrl is called again. Someone know why? Thank you

epworthhh commented 6 years ago

It resolved by updating to 1.0.15. I was using 0.3.1