就像在routing guide中介绍的那样,不管什么时候你在路由器中定义一个新路径,Ember.js就会尝试寻找一个对应的routecontrollertemplate,它们的命名都是根据命名约定的。如果没找到任何这些对象的实现,会为你生成合适的对象。

一、Generated Routes

假定你有如下路由:

Router.map(function() {
this.route('posts');
});

当你导航到/posts,Ember.js寻找routes:posts。如果没有找到,它会自动生成一个。

二、Generated Controllers

如果导航到路由posts,Ember.js会寻找名为controller:posts的contorller。如果没有找到,会生成一个。

三、Generated Tempaltes

路由需要一个template,如果你不提供一个模板,一个空的模板将会生成。

空模板包含一个{{outlet}},所以嵌套的路由将会被正确渲染,尽管路由没有明确提供一个模板。

{{outlet}}

4.3 Routing -- Generated Objects的更多相关文章

  1. 解决mybatis generator警告Cannot obtain primary key information from the database, generated objects may be incomplete

    使用 mybatis generator 生成pojo.dao.mapper时 经常出现 Cannot obtain primary key information from the database ...

  2. Mybatis抛出:Cannot obtain primary key information from the database, generated objects may be incomplete

    使用 mybatis generator 生成pojo.dao.mapper时,可能会遇到 Cannot obtain primary key information from the databas ...

  3. spring boot集成mybatis只剩两个sql 并提示 Cannot obtain primary key information from the database, generated objects may be incomplete

    前言 spring boot集成mybatis时只生成两个sql, 搞了一个早上,终于找到原因了 找了很多办法都没有解决, 最后注意到生成sql的时候打印了一句话: Cannot obtain pri ...

  4. Ember.js学习教程 -- 目录

    写在前面的话: 公司的新项目需要用到Ember.js,版本为v1.13.0.由于网上关于Ember的资料非常少,所以只有硬着头皮看官网的Guides,为了加深印象和方便以后查阅就用自己拙劣的英语水平把 ...

  5. The main difference between Java & C++(转载)

    转载自:http://stackoverflow.com/questions/9192309/the-main-difference-between-java-c C++ supports point ...

  6. Java Main Differences between Java and C++

    转载自:http://www.cnblogs.com/springfor/p/4036739.html C++ supports pointers whereas Java does not. But ...

  7. Java & XML Tool Overview

    As mentioned in the introduction Sun now provides these tools for XML Processing in Java: StAX Reade ...

  8. PA教材提纲 TAW10-2

    Unit1 Introduction to the ABAP Dictionary(ABAP字典介绍) 1.1 Describing the ABAP Dictionary(描述ABAP字典) ABA ...

  9. java 中 ResourceBundle 使用 国际化使用

    java 中 ResourceBundle 使用 可以根据以下类进行获取国际化文件: package org.mybatis.generator.internal.util.messages; imp ...

随机推荐

  1. JBPM4.4_jBPM4.4的流程定义语言(设计流程)

    1. jBPM4.4的流程定义语言(设计流程) 1.1. process(流程) 是.jpdl.xml的根元素,可以指定的属性有: 属性名 作用说明 name 流程定义的名称,用于显示. key 流程 ...

  2. J2EE开发推荐工具

  3. Python 入门(六)Dict和Set类型

    什么是dict 我们已经知道,list 和 tuple 可以用来表示顺序集合,例如,班里同学的名字: ['Adam', 'Lisa', 'Bart'] 或者考试的成绩列表: [95, 85, 59] ...

  4. 【java】将List中的实体按照某个字段进行分组的算法

    如何将List中存放的实体按照某个字段进行分组呢?来看看下面的例子,假如实体中有个字段叫批次号,我们将具有相同批次号的实体放在一起,那么怎么实现呢?看下面的代码: 可以定义个Map,Map的key用于 ...

  5. thinkphp5.0开发规范

    命名规范 ThinkPHP5遵循PSR-2命名规范和PSR-4自动加载规范,并且注意如下规范: 目录和文件 目录不强制规范,驼峰及小写+下划线模式均支持: 类库.函数文件统一以.php为后缀: 类的文 ...

  6. Hadoop DBOutputFormat的使用

    最近在研究数据在HDFS和关系型数据库之间的迁移,主要使用了两种方式:一是,按照数据库要求的文件格式生成文件,然后由数据库提供的导入工具进行导入:二是采用JDBC的方式进行导入.MapReduce默认 ...

  7. vue-学习笔记(更新中...)

    vue学习笔记 2017-08-23  11:10:28 Vue实例: var vm = new Vue({ // 选项 }) 实例化Vue.Vue实例,构造函数Vue.创建一个Vue的根实例,Vue ...

  8. LeetCode——Best Time to Buy and Sell Stock II

    Description: Say you have an array for which the ith element is the price of a given stock on day i. ...

  9. 关于font-size对垂直居中影响的问题

    背景:三个inline-block元素,其中两个内容为空,另外一个包含文字,设置文字的font-size之后,原本垂直居中的三个inline-block的元素,会变的不再垂直居中. 原因: 当设置了f ...

  10. 使用ThreadLocal在线程内部传递数据

    最近在项目中使用到了JDK提供的线程池,遇到了在多线程环境下在线程内部共享数据的问题 使用ThreadLocal 来解决线程内部共享数据的问题 定义BO package com.unicom.uclo ...