Before my Ember application boots, I would like to dynamically set a variable depending the URL:
// Dummy example
if (window.location.hostname == 'awesomewebsite.com') {
// Set a "global variable" called town
}
I want to have the possibility to rely on that variable to do some stuff afterwards (in a component, template and so on).
What will be the best way to do that ?
Aucun commentaire:
Enregistrer un commentaire