我一直收到这个错误:
无法找到名为" layoutSimple"的模板或" layoutSimple"。你确定你定义了吗?
路线代码:
Router.onBeforeAction(OnBeforeActions.loginRequired, {
except: ['login', 'logout']
});
Router.onBeforeAction(OnBeforeActions.adminRequired, {
except: ['login', 'logout']
});
Router.route("main", {
template: 'Dashboard',
path: '/'
});
Router.route("login", {layoutTemplate: 'layoutSimple'});
Router.route("logout", {layoutTemplate: 'layoutSimple'});
Router.route('adminRequired', {layoutTemplate: 'layoutSimple'});
模板代码:
<template name="layoutSimple">
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper sidebar-collapse">
<!-- Main content -->
<section class="content">
{{>yield}}
</section>
</div>
</template>