3.2 Templates -- The Application Template
1. 当你的应用程序启动时application模板是默认被渲染的的模板。
2. 你应该把你的header, footer和其他任何的装饰内容放到这里。此外,你应该有至少一个{{outlet}}:它是一个占位符,路由器将根据当前的URL填入适当的模板。
3. example:
app/templates/application.hbs
<header>
<h1>Igor's Blog</h1>
</header> <div>
{{outlet}}
</div> <footer>
©2013 Igor's Publishing, Inc.
</footer>
- header, footer将一直被显示在屏幕上,但是<div>中的内容将会根据用户当前的路由发生变化,例如/posts或者/posts/15。
4. Ember CLI将会创建为你application.hbs,默认放在app/templates/application.hbs。
3.2 Templates -- The Application Template的更多相关文章
- tornado 学习笔记9 Tornado web 框架---模板(template)功能分析
Tornado模板系统是将模板编译成Python代码. 最基本的使用方式: t = template.Template("<html>{{ myv ...
- Spring boot配置文件 application.properties
http://www.tuicool.com/articles/veUjQba 本文记录Spring Boot application.propertis配置文件的相关通用属性 # ========= ...
- Differences Between Xcode Project Templates for iOS Apps
Differences Between Xcode Project Templates for iOS Apps When you create a new iOS app project in Xc ...
- [Ember] Ember.js Templates
In this lesson, we'll go over some of the basics of Ember.js templates and how they work with contro ...
- SpringBoot 配置文件 application.properties
转:http://www.qiyadeng.com/post/spring-boot-application-properties #########COMMON SPRING BOOT PROPER ...
- spring boot application properties配置详解
# =================================================================== # COMMON SPRING BOOT PROPERTIE ...
- Spring Boot 菜鸟教程 application.properties 常用配置
SPRING CONFIG (ConfigFileApplicationListener) spring.config.name 配置文件名称,默认为application spring.config ...
- 附录B. Spring Boot 配置文件application.properties
#SPRING CONFIG (ConfigFileApplicationListener) spring.config.name= # config file name (default to 'a ...
- 【转】application.properties 常见配置
Various properties can be specified inside your application.properties/application.yml file or as co ...
随机推荐
- NHibernate初学五之关联一对多关系
1:创建两张表T_Country.T_Person:其中T_Person表中有一个CountryID对应T_Country的ID,一个Country可以对应多个Person CREATE TABLE ...
- TCP处理主要开销
快速的网络TCP 通常受限 发送主机 与 接收主机. 而不是网络设备或协议本身的实现. TCP的处理的主要开销 分为中断操作.数据复制和协议处理. 1:中断操作 2:数据复制 3:协议处理 TCP的处 ...
- spring xml properties split with comma for list
在注入spring bean 属性值的时候常常会用到list, 一般使用方式例如以下: <bean id="testBean" class="com.mytest. ...
- POJ 1661 Help Jimmy(递推DP)
思路: 1. 每个板子有左右两端, dp[i][0], dp[i][1] 分别记录左右端到地面的时间 2. 从下到上递推计算, 上一层的板子必然会落到下面的某一层板子上, 或者地面上 总结: 1. 计 ...
- os.path模块【python】
os.path.abspath(path) #返回绝对路径 os.path.basename(path) #返回文件名 os.path.commonprefix(list) #返回list(多个路径) ...
- Discuz! X2验证码的产生及验证
http://www.mcqyy.com/wenku/jiaocheng/jzjc/cjc/106729.html http://blog.sina.com.cn/s/blog_4acbd39c010 ...
- Deploying Cloud Foundry on OpenStack Juno and XenServer (Part I)
link http://rabbitstack.github.io/deploying-cloud-foundry-on-openstack-juno-and-xenserver-part-i/ Cl ...
- JS-【同页面多次调用】轮播特效封装-json传多个参数
看着传那么一长串的参数神烦,继续深化!——json传参: html: <div class="scrollBanner"> <ul class="ban ...
- 域渗透学习预备知识-IPC$的入侵防御
一.什么是IPC$ 以下段落引文自:http://www.xfocus.net/articles/200303/493.html IPC$(Internet Process Connection)是共 ...
- Array.prototype.forEach数组遍历
forEach是Array新方法中最基本的一个,就是遍历,循环.先看以前是怎么遍历数组的 常用遍历 var arr = [1,2,3,4,5]; for(var i = 0; i < arr.l ...