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
/* | |
PURPOSE | |
The purpose of this gist is to show how you can dynamically bust the cache of your angular template files only when the files have been changed. | |
PREREQUISITES: | |
1) You use Gulp to build/organize your front end application | |
2) In your front end build process you have already run the 'app:scripts' and 'app:templates' tasks: | |
'app:scripts' - This takes all of your separate app js files and combines them into one file to deliver to the browser. | |
'app:templates' - If you are using Jade or another html templating library/framework then this task would convert those files into browser-readable html files | |
I specify these two tasks as dependencies to the cache busting task defined below. They can easily be modified or omitted to match your specific build process |