Reputation: 534
I am new to Meteor and in-fact in learning stage. I am working on a project, in which I have two views Front-end and Back-end(Dashboard).
I want to ask multiple things regarding the best way of loading external scripts in Meteor so that it runs fast.
Where to load the external script in Meteor so that application runs like a bullet, mean in template or in template's helper. (Currently I am loading scripts in templates by using script tags in it like <template name="myTemplate"><script>Loads any JS file</script></template>
)
What should be best way to load scripts fast that are dependent on each other in a theme.
How can I separate load CSS & JS files for front-end and back-end so that front-end files should not interrupt/load in back-end and back-end file should not interrupt/load in front-end
Upvotes: 0
Views: 310
Reputation: 192
If you load a script in the
<head></head>
you won't run into any problems with Meteor. Generally thats the best way to do it. Same thing with your CSS files. If for some reason you need to load a script tag in the body, check out this article that describes two ways.
http://www.kaplankomputing.com/blog/tutorials/two-ways-to-add-a-script-tag-in-meteor/
Upvotes: 1