铁:路由器错误无法找到模板

时间:2017-10-10 22:13:16

标签: meteor iron-router angular-meteor

我在MeteorJS中实施了一个项目。 为了进行路由,我安装了Iron:Router

meteor add iron:router@1.0.0-pre4

我有一个包含router.js的“lib”文件夹:

Router.configure ({
  layoutTemplate: 'baseLayout'
});

我有一个“client”文件夹,其中包含baseLayout.html的“baseLayout”文件夹:

<template name = 'baseLayout'>
UPF App Test
     <a href="{{pathFor'home'}}"> Home </a>
     {{> yield}}
</template>

从meteor开始时,它显示以下错误:

找不到名为“baseLayout”或“baseLayout”的模板。你确定你定义了吗?

我到处搜索,尝试更改铁的版本:路由器,使用{{&gt; spinner}}而不是{{&gt; yield}}并且根本不起作用:(

# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-base@1.1.0             # Packages every Meteor app needs to have
mobile-experience@1.0.5       # Packages for a great mobile UX
mongo@1.2.2                   # The database Meteor supports right now
reactive-var@1.0.11            # Reactive variable for tracker
tracker@1.1.3                 # Meteor's client-side reactive programming library

standard-minifier-css@1.3.5   # CSS minifier run for production mode
standard-minifier-js@2.1.2    # JS minifier run for production mode
es5-shim@4.6.15                # ECMAScript 5 compatibility for older browsers
ecmascript@0.8.3              # Enable ECMAScript2015+ syntax in app code
shell-server@0.2.4            # Server-side component of the `meteor shell` command

autopublish@1.0.7             # Publish all data to the clients (for prototyping)
insecure@1.0.7                # Allow all DB writes from clients (for prototyping)
angular-templates
simple:json-routes
iron:router@1.0.0-pre4

0 个答案:

没有答案