I am making a "multipage" app with meteor and would like to use different css files per page. Is this possible?
Meteor doesn't allow (currently) helpers inside the tag.
Rapid way: wrap all your content inside a div with an #id an then use stylus to wrap all the css rules ander that tag:
#myPagewrap1
#row
some: rule
#myPagewrap1
#row
some: rule
Long way: attach some dynamic css call to the .created method of your template.
Template.myPage.created = function(){
loadStyle("pathtostyle.css");
}
And your loadStyle function could be something like this: http://www.javascriptkit.com/javatutors/loadjavascriptcss.shtml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With