I thought you wanted to maintain the script in one place?
The script is loaded and will then run on. The alert() in the simple example only runs once unless you refresh, that may of confused the issue.
try this
[{"id":"93d1e86d.a97468","type":"http in","z":"bf9e1e33.030598","name":"","url":"/js_script","method":"get","upload":false,"swaggerDoc":"","x":150,"y":60,"wires":[["710d926e.2f1d6c"]]},{"id":"710d926e.2f1d6c","type":"template","z":"bf9e1e33.030598","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"var value = \"hello world\"; \nthis.scope.action = function() { return value; }","output":"str","x":300,"y":20,"wires":[["5fb30c14.5253fc"]]},{"id":"5fb30c14.5253fc","type":"http response","z":"bf9e1e33.030598","name":"","statusCode":"","headers":{},"x":400,"y":60,"wires":[]},{"id":"c860115e.5cea28","type":"inject","z":"bf9e1e33.030598","name":"load script","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"tab\":\"\"}","payloadType":"json","x":510,"y":20,"wires":[["a43dc4b9.dd5e08"]]},{"id":"a43dc4b9.dd5e08","type":"ui_ui_control","z":"bf9e1e33.030598","name":"","events":"all","x":680,"y":40,"wires":[[]]},{"id":"528140c6.f07058","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":250,"y":140,"wires":[["a4c28729.b95928"]]},{"id":"a4c28729.b95928","type":"ui_template","z":"bf9e1e33.030598","group":"8b5cde76.edd58","name":"","order":8,"width":0,"height":0,"format":"<script type=\"text/javascript\" src=\"/js_script\"></script>\n<md-button ng-click=\"send({payload:action()})\">\n Click me to send a hello world\n</md-button>","storeOutMessages":true,"fwdInMessages":false,"resendOnRefresh":true,"templateScope":"local","className":"","x":450,"y":140,"wires":[["c114099e.6af7f"]]},{"id":"c114099e.6af7f","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":640,"y":180,"wires":[]},{"id":"8b5cde76.edd58","type":"ui_group","name":"default","tab":"8f03e639.85956","order":1,"disp":false,"width":"12","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","order":2,"disabled":false,"hidden":false}]
Edit the script in the template, refresh the page and the new script is loaded.
[edit] Or use ui-control to refresh dashboard tabs when you have edited the script. I added it to above example.