|
|
@@ -641,9 +641,14 @@ function $TemplateFactory( $http, $templateCache, $injector) {
|
|
|
this.fromUrl = function (url, params) {
|
|
|
if (isFunction(url)) url = url(params);
|
|
|
if (url == null) return null;
|
|
|
- else return $http
|
|
|
- .get(url, { cache: $templateCache, headers: { Accept: 'text/html' }})
|
|
|
- .then(function(response) { return response.data; });
|
|
|
+ else {
|
|
|
+ // version control
|
|
|
+ var suffix = window._app_version;
|
|
|
+ if (suffix && /(http(s)*:\/\/|static\/).+/.test(url))
|
|
|
+ url += suffix;
|
|
|
+ return $http.get(url, { cache: $templateCache, headers: { Accept: 'text/html' }})
|
|
|
+ .then(function(response) { return response.data; })
|
|
|
+ };
|
|
|
};
|
|
|
|
|
|
/**
|