Calling the above function in function getHeaderText()
get the currentScriptPath
// getting the path of the multiselect.js file
var scripts = document.getElementsByTagName("script")
var currentScriptPath = scripts[scripts.length-1].src;
Used the currentScriptPath as below -
templateUrl: function (element, attr) {
// multiselect.tmpl.html path relative to multiselect.js
return attr.templateUrl || currentScriptPath.substring(0, currentScriptPath.lastIndexOf('/') + 1)
File changed - multiselect.js
Fix for issues -
Changes made -
Added a new function - getItemLabel(items,model)
Calling the above function in function getHeaderText()
get the currentScriptPath // getting the path of the multiselect.js file var scripts = document.getElementsByTagName("script") var currentScriptPath = scripts[scripts.length-1].src;
Used the currentScriptPath as below - templateUrl: function (element, attr) { // multiselect.tmpl.html path relative to multiselect.js return attr.templateUrl || currentScriptPath.substring(0, currentScriptPath.lastIndexOf('/') + 1)
Plnkr link after fixes - link3