2016-05-18 16:43:02 -04:00
|
|
|
|
block includes
|
|
|
|
|
include ../_util-fns
|
2015-08-08 16:55:53 -04:00
|
|
|
|
|
2015-12-21 09:30:36 -05:00
|
|
|
|
figure
|
2016-11-22 07:07:16 -05:00
|
|
|
|
img(src="/resources/images/devguide/intro/people.png" alt="Us" align="left" style="width:200px; margin-left:-40px;margin-right:10px")
|
|
|
|
|
|
2015-11-28 23:43:09 -05:00
|
|
|
|
:marked
|
2016-02-06 02:27:06 -05:00
|
|
|
|
This is a practical guide to Angular for experienced programmers who
|
2016-11-22 07:07:16 -05:00
|
|
|
|
are building client applications in HTML and #{_Lang}. <br class="l-clear-left">
|
2016-01-18 03:32:36 -05:00
|
|
|
|
|
2016-05-13 06:15:42 -04:00
|
|
|
|
这是一份Angular实战指南。面向的是正在用HTML和#{langName}构建客户端应用的、有经验的程序员。
|
2016-04-19 12:18:04 -04:00
|
|
|
|
|
2016-11-22 07:07:16 -05:00
|
|
|
|
## Organization
|
|
|
|
|
|
|
|
|
|
## 组织结构
|
2016-02-25 12:03:50 -05:00
|
|
|
|
|
2016-02-06 02:27:06 -05:00
|
|
|
|
The documentation is divided into major thematic sections, each
|
2016-08-29 11:37:39 -04:00
|
|
|
|
a collection of pages devoted to that theme.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-08 05:20:01 -04:00
|
|
|
|
本文档分成几大主题区,每个区包含一组围绕自己主题的页面。
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-24 17:30:06 -04:00
|
|
|
|
block js-alert
|
|
|
|
|
|
2016-11-22 07:07:16 -05:00
|
|
|
|
- var __lang = _docsFor || current.path[1] || 'ts';
|
|
|
|
|
- var guideData = public.docs[__lang].latest.guide._data;
|
|
|
|
|
- var advancedLandingPage = '';
|
|
|
|
|
- for(var page in guideData) {
|
|
|
|
|
- if (!guideData[page].basics && !guideData[page].hide) { advancedLandingPage = page; break; }
|
|
|
|
|
- }
|
|
|
|
|
- var advancedUrl = './' + advancedLandingPage + '.html'
|
2016-02-06 02:27:06 -05:00
|
|
|
|
- var top="vertical-align:top"
|
2016-11-22 07:07:16 -05:00
|
|
|
|
table(width="100%")
|
2016-02-06 02:27:06 -05:00
|
|
|
|
col(width="15%")
|
|
|
|
|
col
|
|
|
|
|
tr(style=top)
|
2016-11-22 07:07:16 -05:00
|
|
|
|
td
|
|
|
|
|
p <b><a href="../quickstart.html">QuickStart</a></b>
|
|
|
|
|
p <b><a href="../quickstart.html">快速起步</a></b>
|
2016-05-18 16:43:02 -04:00
|
|
|
|
td
|
|
|
|
|
:marked
|
2016-08-29 11:37:39 -04:00
|
|
|
|
The foundation for every page and sample in this documentation.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-08 05:20:01 -04:00
|
|
|
|
本文档中每一个页面和范例的基础工作。
|
2016-05-24 09:27:24 -04:00
|
|
|
|
tr(style=top)
|
2016-11-22 07:07:16 -05:00
|
|
|
|
td
|
|
|
|
|
p <b><a href="./">Guide</a></b>
|
|
|
|
|
p <b><a href="./">指南</a></b>
|
2016-02-06 02:27:06 -05:00
|
|
|
|
td
|
|
|
|
|
:marked
|
2016-09-20 00:23:02 -04:00
|
|
|
|
The essential ingredients of Angular development.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-23 17:13:02 -04:00
|
|
|
|
Angular开发中必不可少的要素。
|
2016-02-06 02:27:06 -05:00
|
|
|
|
tr(style=top)
|
2016-11-22 07:07:16 -05:00
|
|
|
|
td
|
|
|
|
|
p <b><a href="../api">API Reference</a></b>
|
|
|
|
|
p <b><a href="../api">API参考手册</a></b>
|
2016-02-06 02:27:06 -05:00
|
|
|
|
td
|
|
|
|
|
:marked
|
2016-09-20 00:23:02 -04:00
|
|
|
|
Authoritative details about each member of the Angular libraries.
|
2016-09-23 17:13:02 -04:00
|
|
|
|
|
2016-11-22 07:07:16 -05:00
|
|
|
|
关于Angular库中每一个成员的详尽、权威的资料。
|
2016-02-06 02:27:06 -05:00
|
|
|
|
tr(style=top)
|
2016-11-22 07:07:16 -05:00
|
|
|
|
td
|
|
|
|
|
p <b><a href="../tutorial">Tutorial</a></b>
|
|
|
|
|
p <b><a href="../tutorial">教程</a></b>
|
2016-02-06 02:27:06 -05:00
|
|
|
|
td
|
|
|
|
|
:marked
|
2016-09-20 00:23:02 -04:00
|
|
|
|
A step-by-step, immersive approach to learning Angular that
|
|
|
|
|
introduces the major features of Angular in an application context.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-23 17:13:02 -04:00
|
|
|
|
按部就班、沉浸式的Angular学习之旅,在应用场景中介绍了Angular的各个主要特性。
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-02-06 02:27:06 -05:00
|
|
|
|
tr(style=top)
|
2016-11-22 07:07:16 -05:00
|
|
|
|
td
|
|
|
|
|
p <b><a href="!{advancedUrl}">Advanced</a></b>
|
|
|
|
|
p <b><a href="!{advancedUrl}">高级</a></b>
|
2016-02-06 02:27:06 -05:00
|
|
|
|
td
|
|
|
|
|
:marked
|
2016-05-18 16:43:02 -04:00
|
|
|
|
In-depth analysis of Angular features and development practices.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-04-19 12:18:04 -04:00
|
|
|
|
深入分析Angular的特性和开发实践。
|
2016-02-06 02:27:06 -05:00
|
|
|
|
tr(style=top)
|
2016-11-22 07:07:16 -05:00
|
|
|
|
td
|
|
|
|
|
p <b><a href="../cookbook">Cookbook</a></b>
|
|
|
|
|
p <b><a href="../cookbook">烹饪宝典</a></b>
|
2016-02-06 02:27:06 -05:00
|
|
|
|
td
|
|
|
|
|
:marked
|
|
|
|
|
Recipes for specific application challenges, mostly code snippets with a minimum of exposition.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-11-08 09:45:09 -05:00
|
|
|
|
一组解决实际应用中某些特定挑战的“菜谱”,大部分是代码片段随带少量的详细阐述。
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-02-25 12:03:50 -05:00
|
|
|
|
:marked
|
2016-11-22 07:07:16 -05:00
|
|
|
|
## Learning path
|
|
|
|
|
## 学习路径
|
|
|
|
|
|
2016-08-29 11:37:39 -04:00
|
|
|
|
You don't have to read the guide straight through. Most pages stand on their own.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-11-08 09:45:09 -05:00
|
|
|
|
我们不需要从头到尾依次阅读本指南。大部分页面都是独立的。
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-20 00:23:02 -04:00
|
|
|
|
For those new to Angular, the recommended learning path runs through the *Guide* section:
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-23 17:13:02 -04:00
|
|
|
|
对于Angular新手,建议的学习路径是走完“指南”区:
|
2015-12-11 18:37:35 -05:00
|
|
|
|
|
2016-08-29 11:37:39 -04:00
|
|
|
|
1. For the big picture, read the [Architecture](architecture.html) overview.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-11-08 09:45:09 -05:00
|
|
|
|
1. 要了解全景图,请阅读[架构](architecture.html)概览。
|
2016-05-18 16:43:02 -04:00
|
|
|
|
|
2016-09-19 23:24:40 -04:00
|
|
|
|
1. Try [QuickStart](../quickstart.html). QuickStart is the "Hello, World" of Angular.
|
2016-08-29 11:37:39 -04:00
|
|
|
|
It shows you how to set up the libraries and tools you'll need to write *any* Angular app.
|
2016-05-18 16:43:02 -04:00
|
|
|
|
|
2016-11-08 09:45:09 -05:00
|
|
|
|
1. 试用[“快速起步”](../quickstart.html)。“快速起步”是Angular的“Hello, World”。
|
|
|
|
|
它会告诉我们如何设置*任何*Angular应用程序都会用到的库和工具。
|
2016-09-08 05:20:01 -04:00
|
|
|
|
|
2016-08-29 11:37:39 -04:00
|
|
|
|
1. Take the *Tour of Heroes* [tutorial](../tutorial), which picks up where QuickStart leaves off,
|
|
|
|
|
and builds a simple data-driven app. The app demonstrates the essential characteristics of a professional application:
|
2016-05-18 16:43:02 -04:00
|
|
|
|
a sensible project structure, data binding, master/detail, services, dependency injection, navigation, and remote data access.
|
|
|
|
|
|
2016-11-08 09:45:09 -05:00
|
|
|
|
1. 学习*英雄指南*[教程](../tutorial) ,它将从“快速起步”出发,最终构建出一个简单的数据驱动的应用。
|
2016-05-13 06:15:42 -04:00
|
|
|
|
它虽简单,但也具有我们写一个专业应用时所需的一切基本特性:
|
2016-04-19 12:18:04 -04:00
|
|
|
|
实用的项目结构、数据绑定、主从视图、服务、依赖注入、导航,以及远程数据访问。
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-08-29 11:37:39 -04:00
|
|
|
|
1. [Displaying Data](displaying-data.html) explains how to display information on the screen.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-04-19 12:18:04 -04:00
|
|
|
|
1. [显示数据](displaying-data.html)解释了如何把信息显示到屏幕上。
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-08-29 11:37:39 -04:00
|
|
|
|
1. [User Input](user-input.html) covers how Angular responds to user behavior.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-08 05:20:01 -04:00
|
|
|
|
1. [用户输入](user-input.html)解释了Angular如何响应用户行为。
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-08-29 11:37:39 -04:00
|
|
|
|
1. [Forms](forms.html) handles user data entry and validation within the UI.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-08 05:20:01 -04:00
|
|
|
|
1. [表单](forms.html)用来在UI中处理用户输入的数据,并进行有效性验证。
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-08-29 11:37:39 -04:00
|
|
|
|
1. [Dependency Injection](dependency-injection.html) is the way to build large, maintainable applications
|
2016-05-18 16:43:02 -04:00
|
|
|
|
from small, single-purpose parts.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-05-25 09:21:02 -04:00
|
|
|
|
1. [依赖注入](dependency-injection.html)是我们把小型、单一用途的部件组装成大型、可维护的应用的方法。
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-05-18 16:43:02 -04:00
|
|
|
|
1. [Template Syntax](template-syntax.html) is a comprehensive study of Angular template HTML.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-05-13 06:15:42 -04:00
|
|
|
|
1. [模板语法](template-syntax.html)是对Angular模板HTML的全面讲解。
|
2015-11-28 23:43:09 -05:00
|
|
|
|
|
2016-08-29 11:37:39 -04:00
|
|
|
|
After reading the above sections, you can skip to any other pages on this site.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-08 05:20:01 -04:00
|
|
|
|
读完这些,你就可以跳到本网站的任意页面去阅读了。
|
|
|
|
|
|
2016-11-22 07:07:16 -05:00
|
|
|
|
## Code samples
|
|
|
|
|
## 代码范例
|
|
|
|
|
|
2016-08-29 11:37:39 -04:00
|
|
|
|
Each page includes code snippets that you can reuse in your applications.
|
|
|
|
|
These snippets are excerpts from a sample application that accompanies the page.
|
2016-05-18 16:43:02 -04:00
|
|
|
|
|
2016-09-08 05:20:01 -04:00
|
|
|
|
每个页面都包含一些能在我们自己的应用中复用的代码片段。
|
|
|
|
|
这些片段来自于相应页面中附带的范例应用。
|
2016-05-19 01:33:02 -04:00
|
|
|
|
|
2016-11-22 07:07:16 -05:00
|
|
|
|
Look for a link to a running version of that sample near the top of each page,
|
|
|
|
|
such as this <live-example name="architecture"></live-example> from the [Architecture](architecture.html) page.
|
|
|
|
|
<p if-docs="ts">
|
|
|
|
|
The link launches a browser-based code editor where you can inspect, modify, save, and download the code.
|
|
|
|
|
</p>
|
2016-05-18 16:43:02 -04:00
|
|
|
|
|
2016-11-22 07:07:16 -05:00
|
|
|
|
在每页靠近顶部的地方都可以看到一个链接,指向这个范例的可执行版本,比如[架构](architecture.html)一章中的<live-example name="architecture"></live-example>。
|
|
|
|
|
<p if-docs="ts">
|
|
|
|
|
这个链接启动一个基于浏览器的代码编辑器,在这里,我们可以查看、修改、保存和下载这些代码。
|
|
|
|
|
</p>
|
2016-05-19 01:33:02 -04:00
|
|
|
|
|
2016-08-29 11:37:39 -04:00
|
|
|
|
A few early pages are written as tutorials and are clearly marked as such.
|
|
|
|
|
The rest of the pages highlight key points in code rather than explain each step necessary to build the sample.
|
|
|
|
|
You can always get the full source through the #{_liveLink}.
|
2016-11-22 07:07:16 -05:00
|
|
|
|
|
2016-09-08 05:20:01 -04:00
|
|
|
|
少量早期页面是作为教程来写的,并被清晰的标注出来。
|
|
|
|
|
其它页面的目的是展示代码中的关键点,而不是解释构建这个范例所需的每一个步骤。
|
|
|
|
|
我们可以通过在线例子的链接找到完整的源代码。
|
2016-05-18 16:43:02 -04:00
|
|
|
|
|
2016-11-22 07:07:16 -05:00
|
|
|
|
## Reference pages
|
|
|
|
|
## 参考资料
|
|
|
|
|
|
|
|
|
|
- The [Cheat Sheet](cheatsheet.html) lists Angular syntax for common scenarios.
|
|
|
|
|
|
|
|
|
|
- [速查表](cheatsheet.html)列出了Angular在常见场景下的语法。
|
|
|
|
|
|
|
|
|
|
- The [Glossary](glossary.html) defines terms that Angular developers should know.
|
|
|
|
|
|
|
|
|
|
- [词汇表](glossary.html)定义了Angular开发者需要知道的术语。
|
|
|
|
|
|
|
|
|
|
- The [API Reference](../api/) is the authority on every public-facing member of the Angular libraries.
|
|
|
|
|
|
|
|
|
|
- [API参考手册](../api/)是关于Angular库中每一个公有成员的权威参考资料。
|
|
|
|
|
|
|
|
|
|
## We welcome feedback!
|
|
|
|
|
## 我们期待您的反馈!
|
|
|
|
|
|
|
|
|
|
- Use the [website GitHub repo](!{_ngDocRepoURL}) for **documentation** issues and pull requests.
|
|
|
|
|
|
|
|
|
|
- 到[angular.io Github库](https://github.com/angular/angular.io)提交**文档相关**的issues和pull requests.
|
|
|
|
|
|
|
|
|
|
- Use the [Angular GitHub repo](!{_ngRepoURL}) to report issues with **Angular** itself.
|
|
|
|
|
|
|
|
|
|
- 到[Angular Github库](https://github.com/angular/angular)报告与**Angular本身**有关的issues。
|