mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-29 03:11:48 -05:00
21 lines
454 B
JavaScript
21 lines
454 B
JavaScript
function templateUrl($sce, path, isTrusted) {
|
|
isTrusted = isTrusted !== false; // defaults to true, can be passed in as false
|
|
var parts = ['', 'static', 'js'];
|
|
parts.push(path);
|
|
|
|
var url = parts.join('/') + '.partial.html';
|
|
|
|
if (isTrusted) {
|
|
url = $sce.trustAsResourceUrl(url);
|
|
}
|
|
|
|
return url;
|
|
}
|
|
|
|
export default
|
|
[ '$sce',
|
|
function($sce) {
|
|
return _.partial(templateUrl, $sce);
|
|
}
|
|
];
|