Can an Ember.js Route redirect to an external URL? -


if want have url on ember.js website called example1.com forwards url on example2.com, how that. can create route of example1.com perform forward example2.com - maybe in beforemodel hook?

just use regular <a>:

<a href="example2.com">route example 2</a> 

if want have forward if user types in url directly address bar, need redirect in server. doesn't have ember though.

alternatively use

app.yourroute = ember.route.extend({   redirect: function() {      window.location.replace("http://stackoverflow.com");   } }); 

the beforemodel (or other) hook should work.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -