Side-menu set startup ion-item


#1

I am building a side menu where I have 5 items in the ion-list I want to set the startup ion-item to be the first one. how to do that?.


#2

It depends on what each item is. If each item is a different state, you should be able to declare which state is the default in the app config:

app.config(function($stateProvider, $urlRouterProvider) {
    $stateProvider
        .state('home', {
            url: '/',
            templateUrl: 'templates/home.html',
            controller: 'HomeController'
        })
        .state('page', {
            url: '/page',
            templateUrl: 'templates/page.html',
            controller: 'PageCtrl'
        });

    $urlRouterProvider.otherwise("/");
});

If the item redirects you to a tab or something else, you would have to do it differently. Could you give more information if that is the case?