(function() {
    'use strict';

    angular
        .module('shipyard')
        .config(getRoutes);

    getRoutes.$inject = ['$stateProvider', '$urlRouterProvider'];

    function getRoutes($stateProvider, $urlRouterProvider) {	
        $stateProvider
            .state('error', {
                url: '/error',
                templateUrl: 'app/error/error.html',
                authenticate: false
            });

        $urlRouterProvider.otherwise('/containers');
    }
})();

(function() {
    'use strict';

    angular
        .module('shipyard')
        .config(getRoutes);

    getRoutes.$inject = ['$stateProvider', '$urlRouterProvider'];

    function getRoutes($stateProvider, $urlRouterProvider) {	
        $stateProvider
            .state('error', {
                url: '/error',
                templateUrl: 'app/error/error.html',
                authenticate: false
            });

        $urlRouterProvider.otherwise(function ($injector) {
            var $state = $injector.get('$state');
            $state.go('dashboard.containers');
        });
    }
})();

Use ui-router's state changes for default route, this ensures we don't get the infinite redirect loop
Use ui-router's state changes for default route, this ensures we don't get the infinite redirect loop

Signed-off-by: Tom Barlow <adf75c2c2ec965e68e8d4752c9742146f0b6495c@gmail.com>
