Hello everyone! I’m have the following scenario:
I have a login page with button. This button must redirect to another page (hence, to another controller, right?)
function RedirectToHome(){
$state.go('app.playlists');
}
So I call like this:
$scope.loginFacebook = function() {
RedirectToHome();
}
Playlist controller declaration:
.state('app.playlists', {
url: "/playlists",
views: {
'menuContent' :{
templateUrl: "templates/playlists.html",
controller: 'PlaylistsCtrl'
}
}
})
Login’s controller declaration:
.state('login', {
url: "/login",
templateUrl: "templates/login.html",
controller: 'LoginCtrl'
})
This project is based on side-menu template.
Everything seems fine, the page change, but the controller is not called. So, the data its not loaded.
Do I have to call it explicitly in a different way?
Thank you!