是否可以根据解析器结果“停止”状态构建?例如,我有以下代码:
/**
* @author v.lugovsky
* created on 16.12.2015
*/
(function() {
'use strict';
angular.module('BlurAdmin.pages.dashboard', [])
.config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
.state('dashboard', {
resolve: {
user: function(baSidebarService){
if(baSidebarService.getStorage()){
return
}
}
},
// if baSidebarService.getStorage() == true
url: '/dashboard',
templateUrl: 'app/pages/dashboard/dashboard.html',
title: 'Dashboard',
sidebarMeta: {
icon: 'ion-android-home',
order: 0,
},
});
}
})();
如果没有安装真正的返回,我希望它能够解决,即隐藏菜单项、导航、图标等。