diff --git a/acute/acute.select/acute.select.js b/acute/acute.select/acute.select.js index fd27bf6..47df558 100644 --- a/acute/acute.select/acute.select.js +++ b/acute/acute.select/acute.select.js @@ -1040,8 +1040,12 @@ angular.module("acute.select", []) // Service to allow host pages to change settings for all instances (in their module.run function) .factory('acuteSelectService', function() { + // Get directory of script + var fileName = "acute.select.js"; + var directory = document.querySelector('script[src$="' + fileName + '"]').getAttribute('src').replace(fileName,""); + var defaultSettings = { - "templatePath": "/acute.select/template", + "templatePath": directory + "template", "noItemsText": "No items found.", "placeholderText": "Please select...", "itemHeight": 24, @@ -1089,4 +1093,4 @@ angular.module("acute.select", []) defaultSettings[settingName] = value; } } -}); \ No newline at end of file +});