3
我在角应用中使用ui路由器,我想通过调用操作返回json格式的状态列表,然后在stateProvider中设置状态列表项,从服务器获取ui路由器的状态,可以&其中i做到这一点,这个代码是在App.config中为CONFIG状态:在使用ui路由器时在应用配置中设置动态状态
var list = ?????// how can get state list here?
var populateStates = function() {
angular.forEach(list, function(item) {
$stateProvider.state(item);
};
};
populateStates();