From dd5a7861cb85fc3d88de3d7e0e4015db36d1cffa Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Thu, 15 Mar 2018 16:08:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BF=BB=E8=AF=91=E4=BA=86=E3=80=8A?= =?UTF-8?q?=E9=A3=8E=E6=A0=BC=E6=8C=87=E5=8D=97=E3=80=8B=E4=B8=AD=E5=89=A9?= =?UTF-8?q?=E4=BD=99=E7=9A=84=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/guide/styleguide.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/aio/content/guide/styleguide.md b/aio/content/guide/styleguide.md index 4900709653..adc0113d4d 100644 --- a/aio/content/guide/styleguide.md +++ b/aio/content/guide/styleguide.md @@ -1798,12 +1798,16 @@ It is rarely worth the effort to change them at the risk of breaking existing co **Consider** using a class instead of an interface for services and declarables (components, directives, and pipes). +**考虑**在服务和可声明对象(组件、指令和管道)中用类代替接口。 +
**Consider** using an interface for data models. +**考虑**用接口作为数据模型。 +
@@ -1835,7 +1839,7 @@ discourage the `I` prefix. **Why?** An interface-class can be a provider lookup token in Angular dependency injection. -**为何?**在 Angular 依赖注入系统中,接口类可以作为服务提供商的查找令牌。 +**为何?**在 Angular 依赖注入系统中,接口类(译注:指写成类的形式,但是只当做接口使用)可以作为服务提供商的查找令牌。
@@ -3636,6 +3640,9 @@ Developers place components on the page as they would native HTML elements and w There are a few cases where you give a component an attribute, such as when you want to augment a built-in element. For example, [Material Design](https://material.angular.io/components/button/overview) uses this technique with `