我找不到如何链接到我的Ember应用程序的根路径.
我试过:{{link-to’index’}}首页{{/ link-to}},但在我的控制台中我收到异常:断言失败:尝试链接到路由“索引”失败(也尝试’index.index’).路由器在其可能的路由中没有找到’index’:’loading’,’error’,’start.loading’,’start.error’
我试过:{{link-to’index’}}首页{{/ link-to}},但在我的控制台中我收到异常:断言失败:尝试链接到路由“索引”失败(也尝试’index.index’).路由器在其可能的路由中没有找到’index’:’loading’,’error’,’start.loading’,’start.error’
同样的,当我尝试{{link-to’application’}}
这是我的路由器
App.Router.map(function() { this.resource('start',{ path: '/start' },function() { //.. sub routes .. }); this.resource('intro',{ path: '/' },function() { // ... }); this.route('login') });
解决方法
根据您使用的版本,它用于仅支持索引,现在应用程序也可以连接到根目录.
{{link-to 'Back to Home' 'application' }} {{link-to 'Back to Home 2' 'index' }}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。