Routes: Refresh dynamic url?

I have a simple question that i can’t seem to figure out.

In the “routes”, i’m using a dynamic URL for the base

“app_url” is set to “”. I have an event to trigger and change “app_url” to “”.

However, even though that var “app_url” is changed, all the links that hit “/apppage” still goto the old value. Seems like the whole url gets cached.

Is there a simple way to refresh the routes so it uses the updated value of “app_url”?


This is how JS works in general:

var a = 'foo';

var b = a + '/test';

console.log(b); // -> 'foo/test';

a = 'bar';

console.log(b); // -> 'foo/test';

You need to update/replace routes manually then, look for view.router.routes object