I am using angular -route-segment in my angular application and trying to configure segments from json feed.
I am having problems with this because I cannot figure out how to inject $http into the app.config function. This does not work with Unknown provider: $http
myApp.config(["$http", "$routeSegmentProvider", function ($http, $routeSegmentProvider) { /* setup navigation here calling $routeSegmentProvider.when a number of times */ }
So instead of entering $ http in config , I also tried entering $routeSegmentProvider in myApp.run
myApp.run(["$http", "$routeSegment", function($http, $routeSegment) { }]);
I also tried
myApp.run(["$http", "$routeSegmentProvider", function($http, $routeSegmentProvider)
but I get an Unknown provider: $routeSegmentProviderProvider <- $routeSegmentProvider
source share