I have an app that have to be customisable and one parameter is the root of the url. The app ain't necessarily at the root of the website, ie. it can be hosted at http://onedomain.com/index.html, where the appName would be /, as it can be hosted at http://anotherdomain.com/myapp/index.html, where the appName would be /myapp/.
But I need to know the appName in the router, so in the configFn of my module, to do this kind of stuff:
return $routeProvider.when(appName + "index.html", {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
As I have more parameters, I started a service I called Settings but you can't inject services while configuring a module…
What would you do?
For my concern, I started thinking about a custom provider but I'm not sure it's appropriate.