I have a javascript library bundled using SystemJs. It contains a self invoking anonymous function. When I import it in on of my viewmodels (I don't want this code to run at the app level) it runs once and then when I leave and re-enter my view the module is already imported so the anonymous function does not run again.
The library I am trying to integrate is Bootstrap-Toc and I am trying to get it to work with Aurelia (using typescript and jspm).
Is there any way to either unload/remove a module that has been imported and then re-import it or somehow force the module to 'refresh' and thereby re-run the code?