Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

New Ionic programmer problem with router and state.go

$
0
0

@gaiapuffo wrote:

Hi I have a simple router login,register and dashboard see below, i am able from login to go in register and dashboard but when i try to go from register to dashboard i have a strange behaviour. The link change http://10.171.23.204:8100/#/dashboard and I see that I enter in dashboard function thought a console.log and so $state.go("dashboard"); is execeuted and i see after the state.go of register controller that the console.log of the dashboard controller is executed. THE PROBLEM: But the dashborad template from register to dashborard is not loaded...I don't understand why

$stateProvider
.state('login', {
cache: false,
url: '/login',
views: {
'login': {
templateUrl: 'templates/login.html',
controller: 'LoginCtrl'
}
}
});
$stateProvider
.state('register', {
cache: false,
url: '/register',
views: {
'register': {
templateUrl: 'templates/register.html',
controller: 'Register'
}
}
});
$stateProvider
.state('dashboard', {
cache: false,
url: '/dashboard',
views: {
'dashboard': {
templateUrl: 'templates/dashboard.html',
controller: 'Dashboard'
}
}
});

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>