【发布时间】:2016-08-10 18:35:11
【问题描述】:
我正在使用 flow-router 处理 Meteor 1.4,并且我必须使用多个布局模板。
路由 /site/template1 加载
BlazeLayout.render('Template1', {
main: 'All_Schools'
});
Template.Template1.onCreated(function () {
import '../styles/template1.scss';
});
路由 /site/template2 加载
BlazeLayout.render('Template2', {
main: 'All_Schools'
});
Template.Template2.onCreated(function () {
import '../styles/template2.scss';
});
问题是.. template1 和 template2 在 UI 中有模板链接 (so no hard reload)。如果用户更改模板。缓存的 scss 样式会影响新样式。如何删除导入的scss文件onDestroy?还是我应该改变我的方法?
【问题讨论】:
标签: meteor sass flow-router