interest Ask.
You can get the version in the regular script tag in the header of the HTML document, making sure that it is loaded synchronously, which I believe by default (script tags that, it seems to me, are loaded synchronously, even when async operations are performed on them). This script will add a CSS class on the head to display the version number.
Then after that you can load angular into the script tag and then do ...
<script ng-if="version==='something'" src='/somePath'></script>
for conditional script tags.
Hope this helps.
Alternatively, use Node grunt or gulp to start the server, which makes an HTTP request to get the version, then writes the index.html page according to the version and then starts the server.
It is worth noting that Node wiredep auto includes script tags in index.html based on bower components.
I feel that the grunt or gulp approach is more natural, although it still seems that 60 %% of the webdev community still live in web shadow ages and have never used or heard of Node or grunted or gulp. lol.
source share