I want to customize ui-select template in certain places, So I am overriding it using templateCache like below example.
module.run(function ($templateCache) {
'ngInject';
const templateName = 'bootstrap/choices.tpl.html';
var template = $templateCache.get(templateName);
template = template.replace("<span class=\"fa fa-minus\"></span>", "<span class=\"fa fa-plus\"></span>);
$templateCache.put(templateName, template);
})
The problem with above approach is it's replacing the template in all ui-select elements. Is there a way we can restrict the behaviour so only specific ui-select elements will be replaced in specific pages.