灰烬#链接到嵌套路由

时间:2018-10-09 14:04:22

标签: ember.js ember-cli

我正在从模板调用链接到语句 路线是这样定义的,

/app/router.js

Router.map.function(){
    this.route('profiles');
    this.route('exam', function(){
        this.route('create');
        this.route('evaluate');
    });

/app/templates/profiles.hbs

{{#link-to "exam/create"}}
   <p> Create an Exam </p>
{{/link-to}}
{{#link-to "exam/evaluate"}}
   <p> Evaluate Exam </p>
{{/link-to}}

1 个答案:

答案 0 :(得分:2)

不确定是否有错误,但是路径的语法有些许错误

{{#link-to "exam.create"}}
   <p> Create an Exam </p>
{{/link-to}}
{{#link-to "exam.evaluate"}}
   <p> Evaluate Exam </p>
{{/link-to}}

应使用.代替/

相关问题