Background: I would like all routes to be added a prefix by a service fired at startup.
The app is to access information about some events e.g. AngularCodeWeek2015, NodeJSRetreat2017, ... so the URLs should be of the format http://www.eventsapp.com/<event_name>
The event_name
prefix is to act as a url parameter but we would like to have it as the first part of all paths rather than something like http://www.eventsapp.com/?event=<event_name>
(The Angular App is getting its data from Dreamfactory and the event_name
will be used to retrieve the right API_KEY, which is different for each event. So at startup, Angular should retrieve the API_KEY using the event_name
found in the URL and then get the relevant data for this event).
Question: After startup, the prefix is supposed to remain the first part of all paths. Yet, because the prefix is dynamically set, would there be a way to either add it to all paths at startup or make the angular router somehow 'ignore' it?