I never wondered about this issue. One possible idea is to reuse a template known as asset versioning, where after the new version you will rename all your assets.
For example, instead of login.html you should use login-xyz.html as the name of the template. xyz may be a random value or a checksum of the file. The checksum may be slightly better, because if the new version is small (i.e. you only fixed a small error in one file), if the user loads any page other than a fixed one, he / she will not worry about reloading - all other files will be have the same checksums, they will work without interruptions.
Thus, when an obsolete Anguar application tries to get a template, it will receive an HTTP 404 error. In addition to this, you could write a simple $ http interceptor that would detect a 404 response and reload the page automatically (or suggest the user can do this).
There are modules that can rename assets, such as gulp-rev - but I have never heard of using this for Angular templates, however you can implement something like this yourself.
Of course, you might want both new and old versions of files to allow users to work without interrupting them with the update. Depending on your requirements. I assume that you are trying to avoid this.
Sample 404 interceptor (CoffeScript, as itβs convenient for me now):
m.factory 'notFoundInterceptor', ($q) -> return { responseError: (response) -> if response?.status == 404
kamituel
source share