var angular = require('angular');
require('./modules');
require('uiRouter');

var module = angular.module('tree.routes');

module.config(function($stateProvider) {
  $stateProvider.state('tree', {
    url:'/tree',
    templateUrl: 'views/tree/tree.tpl.html',
    controller: 'TreeCtrl',
    data: {
      title: '人员部门树',
      url: '^.tree'
    },
    resolve: {
      config: ['$stateParams', function($stateParams) {
        return $stateParams.config ? $stateParams.config : {
          type: 'user',
          moreSelect: false,
          selectType: {
            'user': true,
            'dept': false
          }
        };
      }]
    }
  });
});
