fix: translate error.

This commit is contained in:
NAIVEddd 2018-05-05 15:12:30 +08:00 committed by 雪狼
parent d4fa1d4c61
commit 1b2560cf4e

View File

@ -255,8 +255,8 @@ are for the whole app so it should only be in the root module,
not in feature modules. Feature modules only need the common
directives in `CommonModule`; they dont need to re-install app-wide providers.
对于运行在浏览器中的应用来说,都必须在根模块中 `AppModule`,因为它提供了启动和运行浏览器应用时某些必须的服务。`BrowserModule` 的提供商是面向整个应用的,所以它只能在根模块中使用,而不是特性模块。
特性模块只需要 `CommonModule` 中的常用指令,它们不需要重新安所有全应用级的服务。
对于运行在浏览器中的应用来说,都必须在根模块中 `AppModule` 导入 `BrowserModule` ,因为它提供了启动和运行浏览器应用时某些必须的服务。`BrowserModule` 的提供商是面向整个应用的,所以它只能在根模块中使用,而不是特性模块。
特性模块只需要 `CommonModule` 中的常用指令,它们不需要重新安所有全应用级的服务。
If you do import `BrowserModule` into a lazy loaded feature module,
Angular returns an error telling you to use `CommonModule` instead.