From ec886a90ef6af08edaf647647eeb6053f7381f69 Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Tue, 4 Sep 2018 09:31:32 +0800 Subject: [PATCH] =?UTF-8?q?docs(API):=20=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E4=BA=86=20BrowserModule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/translations/cn/api-plan.md | 2 +- packages/platform-browser/src/browser.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/aio/content/translations/cn/api-plan.md b/aio/content/translations/cn/api-plan.md index e9f6f2e11b..115226a57b 100644 --- a/aio/content/translations/cn/api-plan.md +++ b/aio/content/translations/cn/api-plan.md @@ -45,7 +45,7 @@ [x] | core/ViewContainerRef | 0.42 [x] | common/NgTemplateOutlet | 0.42 [x] | common/Location | 0.41 -[ ] | platform-browser/BrowserModule | 0.40 +[x] | platform-browser/BrowserModule | 0.40 [ ] | common/DecimalPipe | 0.40 [ ] | common/CurrencyPipe | 0.39 [ ] | router/RouterLinkActive | 0.38 diff --git a/packages/platform-browser/src/browser.ts b/packages/platform-browser/src/browser.ts index be4821570b..9a485368e4 100644 --- a/packages/platform-browser/src/browser.ts +++ b/packages/platform-browser/src/browser.ts @@ -37,6 +37,11 @@ export const INTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] = [ * @security Replacing built-in sanitization providers exposes the application to XSS risks. * Attacker-controlled data introduced by an unsanitized provider could expose your * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security). + * + * 替换内置的净化(sanitization)提供商以消除应用的 XSS 风险。 + * 攻击者所控制的数据如果没经过净化就直接引入,则会让你的应用暴露于 XSS 风险之下。 + * 欲知详情,参见[安全](http://g.co/ng/security)。 + * * @experimental */ export const BROWSER_SANITIZATION_PROVIDERS: StaticProvider[] = [ @@ -94,6 +99,7 @@ export const BROWSER_MODULE_PROVIDERS: StaticProvider[] = [ /** * The ng module for the browser. * + * 供浏览器使用的 NgModule。 * */ @NgModule({providers: BROWSER_MODULE_PROVIDERS, exports: [CommonModule, ApplicationModule]}) @@ -110,6 +116,9 @@ export class BrowserModule { * one is present on the page. The specified parameters must include an application id, * which must match between the client and server applications. * + * 配置基于浏览器的应用,使其可以从当前页面上的服务端渲染(SSR)应用过渡而来。 + * 指定的参数必须包含一个应用 id,在客户端应用和服务端应用之间它必须一致。 + * * @experimental */ static withServerTransition(params: {appId: string}): ModuleWithProviders {