How to pass more than one param object in state in ionic framework? in Ionic

12:08 PM

If you want to add more then one parameters in ionic state then you can defiantly add, you can define parameters and separate them by '/'


url:/dashboard/:userName/:userId'

Full Code :

.state('dashboard', {
 url : '/dashboard/:userName/:userId',
 templateUrl : 'templates/dashboard.html',
 controller : 'dashboardCtrl'
})

If you want to go this state, then you can write :

$state.go('dashboard', {
    userName:'Jassu',
    userId: '08ERD019'
});

You Might Also Like

0 comments