Currently, I am utilizing wait-on-lib along with IRLibLoader.load() in conjunction with Iron-Router, following the instructions provided in the tutorial found at: . My objective is to load external javascript code. Below is a snippet of my routing code:
Router.map(function(){
this.route("home", {
path: "/",
waitOn: IRLibLoader.load("/alert.js")
});
});
The javascript file loads successfully. However, the issue arises when loading js files as it hinders the loading of HTML content.
In my setup, there are 3 files and one directory employed:
-- test.html
-- test.js
-- test.css
-- public
---- alert.js
The 'alert.js' consists of a single line of code: alert("hello");
Within my 'test.html', I have a template named "home" containing an h1 tag within it which unfortunately no longer gets displayed upon loading.