function when()

in entity-browser-frontend/app/app.js [35:45]


        function when(path, route) {
            route.resolve = {
                databases: ['$location', 'databaseService', '$q',function ($location, databaseService, $q) {
                    return databaseService.getDatabases().catch(function () {
                        $location.path('/error');
                        return $q.reject();
                    });
                }]
            };
            $routeProvider.when(path, route);
        }