@zahrani wrote:
Hi ,
i have the following code :
.state('service_tab.home', {
url: '/home',
views: {
'service_home-tab': {
//templateUrl: 'templates/staff/service_home.html',
templateUrl: function() {
if (false) {
return "templates/staff/service_home.html";
}
else {
return "templates/student/service_home.html";
}
},
controller: 'service_HomeTabCtrl'
}
} ,
data: {
authorizedRoles: [USER_ROLES.staff ]
}
})the above code only works if the condition is True ,
i need to dynamically redirect the user based on the USER_ROLESthank you
Posts: 4
Participants: 2