angular.module('app').run(['$rootScope', '$state', '$stateParams',
    function($rootScope, $state, $stateParams) {
        $rootScope.$state = $state;
        $rootScope.$stateParams = $stateParams;
    }
]).config(['$stateProvider', '$urlRouterProvider',
    function($stateProvider, $urlRouterProvider) {
        $urlRouterProvider.otherwise('/details-new'); //
        $stateProvider.state('simple', {
                url: '/simple',
                templateUrl: 'templates/simple.html'
            })
            .state('details', {
                url: '/details',
                templateUrl: 'templates/details.html'
            })
            .state('simple-enterprise', {
                url: '/simple-enterprise',
                templateUrl: 'templates/simple-enterprise.html'
            })
            .state('details-enterprise', {
                url: '/details-enterprise',
                templateUrl: 'templates/details-enterprise.html'
            })
            .state('details-new', {
                url: '/details-new',
                templateUrl: 'templates/details-new.html'
            })
            .state('details-new.qrcode', {
                url: '/qrcode',
                templateUrl: 'templates/details-new-qrcode.html'
            })
            .state('details-new.info', {
                url: '/info',
                templateUrl: 'templates/details-new-info.html'
            });
    }
])