Pages

Tuesday, December 15, 2015

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

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'
});

No comments:

Post a Comment