How does Ionic determine if a back-button should be added?


#1

I have made a small application using the sidebar app. However, when I go from one menu point to another, it adds a back-button.

I suspect it may have something to do with my routes?

.state('app', {
	url: "/app",
	abstract: true,
	templateUrl: "templates/menu.html",
})

.state('app.items', {
	url: '/items',
	
	views: {
		'menuContent' :{
			templateUrl: 'js/modules/items/partials/items.html',
			controller: 'ItemsController',
		},
	},

})

.state('app.item', {
	url: '/items/:itemId',
	
	views: {
		'menuContent' :{
			templateUrl: 'js/modules/items/partials/item.html',
			controller: 'ItemController',
		},
	},

})

.state('app.stores', {
	url: '/stores',

	views: {
		'menuContent' :{
			templateUrl: 'test.html',
			controller: 'AuthenticationController',
		}
	}
})

What am I doing wrong?


#2

Yup, this is normal. Since your are changing states, this is a new log in the history.

http://codepen.io/ionic/pen/tcIGK

But if you don’t want this, then you can add nav-clear on the side-menu links