I am not able to redirect from one page to another.
I can route from Splashscreen to topicscreen but when I calling splashScreen from topic my controller executes but templets not loading again.
what to do..
I am using $state.go('topicScreen');
for redirecting from one page to other.
I am able to to go top to down url as defined in config.
getting this error while running in android device
W/BindingManager Cannot call determined Visibility() - never saw a connection for the
my config
ionicApp.config(function($stateProvider, $urlRouterProvider) {
// Ionic uses AngularUI Router which uses the concept of states
// Learn more here: https://github.com/angular-ui/ui-router
// Set up the various states which the app can be in.
// Each state's controller can be found in controllers.js
$stateProvider
.state('splashScreen', {
cache: false,
url: '/splashScreen',
views: {
'splashScreen': {
templateUrl: 'templates/splashScreen.html',
controller: 'SplashScreenCtrl'
}
}
}).state('topicScreen', {
cache: false,
url: '/topicScreen',
views: {
'topicScreen': {
templateUrl: 'templates/topicScreen.html',
controller: 'GridController'
}
}
}).state('questionList', {
cache: false,
url: '/topicScreen/:id/:description/:icon/questionList',
views: {
'questionList': {
templateUrl: 'templates/questionList.html',
controller: 'QuesController'
}
}
}).state('answerPage', {
cache: false,
url: '/topicScreen/:category_id/:id/answerPage',
views: {
'questionList': {
templateUrl: 'templates/answerPage.html',
controller: 'AnsController'
}
}
}).state('costumQues', {
cache: false,
url: '/costumQues/:category_id',
views: {
'costumQues': {
templateUrl: 'templates/costumQues.html',
controller: 'CostomQuesController'
}
}
});
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/splashScreen');
});
my Index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="js/ng-cordova.min.js"></script>
<script src="cordova.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/dbServices.js"></script>
<link href="http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic" rel="stylesheet" type="text/css">
</head>
<body ng-app="starter">
<ion-nav-view name="splashScreen"></ion-nav-view>
<ion-nav-view name="topicScreen"></ion-nav-view>
<ion-nav-view name="questionList"></ion-nav-view>
<ion-nav-view name="answerPage"></ion-nav-view>
<ion-nav-view name="costumQues"></ion-nav-view>
</body>
</html>
In angular I have used when which worked for me
$routeProvider.when('/sales', {
templateUrl : 'sales.html',
controller : 'salesCtrl'
})
Try only this in your html file:
<body ng-app="starter">
<ion-nav-view ></ion-nav-view>
</body>