Created
August 14, 2015 12:52
-
-
Save Tim-Machine/873014475623a3c6f403 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FlowRouter.route('/home', { | |
| // calls just before the action | |
| triggersEnter: [setSite], | |
| action: function() { | |
| // do something you like | |
| }); | |
| setSite = function(){ | |
| var url = window.location.hostname; | |
| var urlBits = url.split('.'); | |
| //example hostnamedocs.meteor.com | |
| // urlBits[0] || subdomain | |
| // urlBits[1] || domain | |
| // urlBits[2] || domain extention | |
| // set some session vals from this | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment