@roub wrote:
Hello,
It's my first ionic app.
Since I activate cache in $stateProvider routing, I'm unable to load one of my page.
I fell I make a mistake in my html...The funny thing is I can load my pageMails and after when I go (with $state.go()) to my pageRules it still stay on pageMails. But If I go to pageAbsence it work and then I can go to pageRules...
here my routing.js
var cacheActive = true;app.config(function ($stateProvider) {
$stateProvider
.state('homepageLogin',{
cache: cacheActive,
url: '/',
templateUrl: 'js/views/homepageLogin.html',
controller: 'homepageLogin'
})
.state('pageMails',{
cache: cacheActive,
url: '/mails',
templateUrl: 'js/views/pageMails.html',
controller: 'pageMails'
})
.state('pageMailDetail',{
cache: cacheActive,
url:'/maildetail',
templateUrl: 'js/views/pageMailDetail.html',
controller: 'mailDetail'
})
.state('pageRules',{
cache: cacheActive,
url:'/rules',
templateUrl: 'js/views/pageRules.html',
controller: 'pageRules'
})
.state('pageRuleDetail',{
cache: cacheActive,
url:'/ruledetail',
templateUrl: 'js/views/pageRuleDetail.html',
controller: 'ruleDetail'
})
.state('pageRuleCreate',{
cache: cacheActive,
url:'/rulecreate',
templateUrl: 'js/views/pageRuleCreate.html',
controller: 'ruleCreate'
})
.state('pageAbsence',{
cache: cacheActive,
url:'/absence',
templateUrl: 'js/views/pageAbsence.html',
controller: 'pageAbsence'
})here my index.html
body ng-app="spamwarsgui" ng-controller="mainCtrl"
ion-nav-view
/ion-nav-view
/bodyhere a parts of my pageMails :
ion-view
ion-side-menus
ion-side-menu-content
div mail-header /div
ion-content padding="true" class="has-subheader has-footer"
.....................
/ion-side-menu
/ion-side-menus
/ion-viewhere a part of my pageRules :
ion-view
ion-side-menus
ion-side-menu-content
div rule-header /div
ion-content padding="true" class="has-subheader has-footer"
...........................
/ion-side-menu
/ion-side-menus
/ion-viewand last a function call each time I move to pageMails or to pageRules or to Absence :
$scope.moveTo = function (targetPage) {
console.log(targetPage,$state.current);
$ionicHistory.clearCache().then(function () {
$state.go(targetPage).then(function () {
console.log($state.current,"ok");
});
});
}and the log when I move from pageMails to pageRules :
pageRules
Object {cache: true, url: "/mails", templateUrl: "js/views/pageMails.html", controller: "pageMails", name: "pageMails"}cache: truecontroller: "pageMails"name: "pageMails"templateUrl: "js/views/pageMails.html"url: "/mails"proto: ObjectmainController.js:70
Object {cache: true, url: "/rules", templateUrl: "js/views/pageRules.html", controller: "pageRules", name: "pageRules"}cache: truecontroller: "pageRules"name: "pageRules"templateUrl: "js/views/pageRules.html"url: "/rules"proto: Object "ok"And the Url is http://localhost:8100/#/rules but the view stay on http://localhost:8100/#/mails
thanks.
Posts: 1
Participants: 1