title: onSuccess Transition Callback UI-router
body: <p>I want to do some action when a particular state has been successfully transitioned. I have the following routing:</p>
  
  <pre><code> angular.module('CurrencyModule')
      .config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
          $locationProvider.hashPrefix('');
          $stateProvider
              .state('currency', {
                  url: '/currency',
                  templateUrl: '/app/currency/page/list.html',
                  controller: 'CurrencyListController as listCtrl',
              })
              .state('currency.create', {
                  url: '/create',
                  templateUrl: '/app/currency/page/create.html',
                  controller: 'CurrencyCreateController as createCtrl',
              })
          ;
      })
  ;
  </code></pre>
  
  <p>and in CurrencyCreateController i have the following:</p>
  
  <pre><code>angular.module('CurrencyModule').controller('CurrencyCreateController', CurrencyCreateController);
  
  CurrencyCreateController.$inject = ['$transitions']
  
  function CurrencyCreateController($transitions) {
      var vm = this;
  
      $transitions.onSuccess({ to: 'currency.create', from: 'currency' }, function(transition) {
          console.log("Open the modal!");
      });
  }
  </code></pre>
  
  <p>However, it never gets inside the callback? Why is that so!</p>
  
  <p>Thanks!</p>