title: Redirection after login
body: <p>I have a redirection problem in my app. These are my state providers:</p>
  
  <pre><code>testApplication.config(function($stateProvider, $urlRouterProvider) {
  
  $stateProvider
  
  .state('app', {
  url: "/app",
  abstract: true,
  templateUrl: "templates/menu.html",
  controller: 'AppCtrl'
  })
  
  .state('app2', {
  url: "/app2",
  abstract: true,
  templateUrl: "templates/menu2.html",
  controller: 'AppCtrl'
  })
  
  .state('app2.login', {
  url: "/login",
  views: {
    'menuContent': {
      templateUrl: "templates/login.html",
      controller: 'LoginCtrl'
    }
  }
  })
  
  .state('app.profile', {
  url: "/profile",
  views: {
    'profile' :{
        templateUrl: "templates/profile.html",
        controller: "ProfileCtrl"
    }
  }
  });
  // if none of the above states are matched, use this as the fallback
  $urlRouterProvider.otherwise('/app2/login');
  });
  </code></pre>
  
  <p>My AppCtrl is empty and this is my LoginCtrl:</p>
  
  <pre><code>testApplication.controller('LoginCtrl', function($scope, $location){ 
   $scope.fbLogin = function() { 
     openFB.login( function(response) { 
       if (response.status === 'connected') {
         // This runs on success 
          console.log('Facebook login succeeded');
          $scope.$apply( function () { $location.path('profile') } ); 
       } else { 
            alert('Facebook login failed'); 
       } 
     }, {scope: 'email,publish_actions,user_friends'}
    ); 
   }; 
  })
  </code></pre>
  
  <p>The problem is that I don't get redirected after login. But if I change </p>
  
  <pre><code>$urlRouterProvider.otherwise('/app2/login');
  </code></pre>
  
  <p>to</p>
  
  <pre><code>$urlRouterProvider.otherwise('/app/profile');
  </code></pre>
  
  <p>And go manually to "#/app2/login" to login I get redirected to the profile page. How can I fix that?</p>