Cause All Route Changes to Full Page Reload Angular JS

×

This post was originally published in 2015
It may contain stale & outdated information. Or it may have grown more awesome with age, like the author.

Inheriting a codebase isn’t fun. Even less fun if the code is filled with so many memory leaks that the only solution is to force a full page load on every route change. Below is a solution that works well in modern browsers, and IE9.

Note the check for changedFrom and changedTo. Without these, an infinite loop will occur.

No comments | Trackback