'use strict';

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

var module = angular.module('initializeset');

module.run(function(AppConfig, $state, configService) {
  configService.getConfig()
  .then(function(data) {
    if(data.length > 1) {
      AppConfig.addSetItem({
        text: '切换服务器',
        state: function () {
          $state.go('initializeset-setUrlNew', {
            backState: 'core-setting'
          });
        },
        order: 6
      });
    }
  });

});
