function $get(   $state,   $rootScope,   $routeParams) {

    var $route = {
      routes: routes,
      params: $routeParams,
      current: undefined
    };

    function stateAsRoute(state) {
      return (state.name !== '') ? state : undefined;
    }

    $rootScope.$on('$stateChangeStart', function (ev, to, toParams, from, fromParams) {
      $rootScope.$broadcast('$routeChangeStart', stateAsRoute(to), stateAsRoute(from));
    });

    $rootScope.$on('$stateChangeSuccess', function (ev, to, toParams, from, fromParams) {
      $route.current = stateAsRoute(to);
      $rootScope.$broadcast('$routeChangeSuccess', stateAsRoute(to), stateAsRoute(from));
      copy(toParams, $route.params);
    });

    $rootScope.$on('$stateChangeError', function (ev, to, toParams, from, fromParams, error) {
      $rootScope.$broadcast('$routeChangeError', stateAsRoute(to), stateAsRoute(from), error);
    });

    return $route;
  }
@ngdoc object
@name ui.router.compat.$route

@requires ui.router.state.$state
@requires $rootScope
@requires $routeParams

@property {object} routes - Array of registered routes.
@property {object} params - Current route params as object.
@property {string} current - Name of the current route.

@description
The `$route` service provides interfaces to access defined routes. It also let's
you access route params through `$routeParams` service, so you have fully
control over all the stuff you would actually get from angular's core `$route`
service.