myApp.config(function($stateProvider, $urlRouterProvider, $locationProvider, authorizedchek) {
.state('panel', {
url: '/panel',
templateUrl: 'templates/panel.php',
controller: 'panelCtrl'
})
.state('panel.admin', {
url: '/admin',
controller: 'adminCtrl',
data: {},
templateUrl: function(){
if (param == true){
return 'templates/admin.php'
}
}
})
});