Error: [$injector:unpr] Unknown provider: $routeProvider <- $route

Hi guys,

I’m busy working away trying to get my first app released, however, I’m having troubles changing the location in code.

this is my controller:

angular.module('goherbal.controllers', ['ionic','goherbal.factories'])
.controller('splashCtrl', function($scope, $stateParams, $location,$timeout) {
 $location.path('/app/main');
            $location.replace();
       }

I’ve tried the module definition with ‘ngRoute’, ‘ui.router’ and nothing, based on other posts saying if using ionic.bundle ngRoute is included.

I’ve been able to get it to work by including an external angualr JS file for ngRoute but I’m sure there must be an “ionic friendly” way, as the stuff is included in the ionic.bundle.js

Any ideas?

Much appreciated.

Hello!

ngRoute, is not a part of the core anymore. You have to manually download ng-route.js file and inject it.

ah right thanks siddhartha