Ember.js API (v2.11.0) 翻译 ---004.Routing---Introduction(引言)
来源:互联网 发布:centos6 搭建php环境 编辑:程序博客网 时间:2024/06/16 10:53
Introdution
假如我们开发一个管理博客的Web应用,那么在任何时候,我们都应该知道正在查看的博客的是哪一篇;别人能否编辑他,这些问题在Ember中是通过URL来决定的
The URL can be set in a few ways:
URL设定的集中方式如下:
The user loads the app for the first time.
应用在加载时设定
Some other event in the app causes the URL to change.
应用中某些事件引起的URL变化
Regardless of how the URL becomes set, the Ember router then maps the current URL to one or more route handlers. A route handler can do several things:
不管URL如何变化,Ember的路由器都能映射当前路由对应的一个或多个路由模板,并且路由处理程序都将去做下面的几件事:
It can render a template.
渲染一个模板
It can load a model that is then available to the template.
加载一个模型数据并且提供给模板
It can redirect to a new route, such as if the user isn't allowed to visit that part of the app.
当用户不允许访问应用中的某些内容是,它能够重定向到一个新的路由
It can handle actions that involve changing a model or transitioning to a new route.
它能够处理如改变模型数据或者导向到一个新的路由的行为
引言
假如我们开发一个管理博客的Web应用,那么在任何时候,我们都应该知道正在查看的博客的是哪一篇;别人能否编辑他,这些问题在Ember中是通过URL来决定的
The URL can be set in a few ways:
URL设定的集中方式如下:
The user loads the app for the first time.
应用在加载时设定
The user changes the URL manually, such as by clicking the back button or by editing the address bar.
用户通过点击浏览器的返回按钮或者编写地址栏修改The user clicks a link within the app.
用户点击应用中的链接Some other event in the app causes the URL to change.
应用中某些事件引起的URL变化
Regardless of how the URL becomes set, the Ember router then maps the current URL to one or more route handlers. A route handler can do several things:
不管URL如何变化,Ember的路由器都能映射当前路由对应的一个或多个路由模板,并且路由处理程序都将去做下面的几件事:
It can render a template.
渲染一个模板
It can load a model that is then available to the template.
加载一个模型数据并且提供给模板
It can redirect to a new route, such as if the user isn't allowed to visit that part of the app.
当用户不允许访问应用中的某些内容是,它能够重定向到一个新的路由
It can handle actions that involve changing a model or transitioning to a new route.
它能够处理如改变模型数据或者导向到一个新的路由的行为
0 0
- Ember.js API (v2.11.0) 翻译 ---004.Routing---Introduction(引言)
- Ember.js API (v2.11.0) 翻译 ---004.Routing---002---Defining Your Routes Edit Page(定义你的路由)
- 翻译RFC3550-1.引言(introduction)
- Introduction to Win32 API 翻译
- ember.js
- [翻译中]API Guides -> Introduction -> Application Fundamentals
- 让Python使用Bing翻译API V2
- 让Python使用Bing翻译API V2
- python调用bing翻译API V2
- Ember.js 介绍系列 (待续)
- Ember.js 入门指南 (一)
- Ember.js 入门指南 (二)
- 斯坦福大学自然语言处理第一课 “引言(introduction)”
- Anroid API Guides 翻译学习——Introduction to Android(android 引入介绍)
- 4.1. Introduction to Linux Routing
- HTTP routing[翻译]
- Zookeeper 开发引言翻译
- Ember.js常用函数
- protobuf 数据的一种封装
- 记一次Java List重复数据的问题
- JDK1.7环境搭建
- 基于Windows API的VC++串口通信详解
- Linux进程的实际用户ID和有效用户ID
- Ember.js API (v2.11.0) 翻译 ---004.Routing---Introduction(引言)
- ROS学习笔记(未完成)
- Hadoop学习(1)---(64bit) Centos7 +Vmware安装及Hadoop环境预配置
- 08、小案例-快递查询
- ros中使用pcl编译报错
- ELASTICSEARCH集群部署
- Spring对JDBC的支持的配置文件
- 20年的种种
- 一步步教你如何使用Android自定义权限。