Ensure imported JavaScript files will work after switched routes
<p>I'm working on a project right now and I'm facing some issues that I'd like to share. I bought a theme which is not built for meteor. It's actually a pure HTML that I'm adapting to a Meteor way.</p>

<p>It is said to import some JS files in order to make it work correctly. After having some troubles, I managed to import them in a way that it's possible to load them correctly:</p>

<pre class="lang-js prettyprint-override"><code>Template.ApplicationLayout.onRendered(function () {
    import '../ui/components/js/core/source/App.js';
    import '../ui/components/js/core/source/AppNavigation.js';
    import '../ui/components/js/core/source/AppOffcanvas.js';
    import '../ui/components/js/core/source/AppCard.js';
    import '../ui/components/js/core/source/AppForm.js';
    import '../ui/components/js/core/source/AppNavSearch.js';
    import '../ui/components/js/core/source/AppVendor.js';
});
</code></pre>

<p>However, whenever I switch between routes, they kinda stop working, it's possible to see some bugs on the HTML. I'm using iron-router to track it.</p>

<p>I was wondering if there would be a way to ensure that the JS was load properly and won't stop working, regardless of switched routes.</p>

<p>Thanks in advance.</p>