diff --git a/public/docs/js/latest/cookbook/ts-to-js.jade b/public/docs/js/latest/cookbook/ts-to-js.jade index 3032fec285..3a2287299b 100644 --- a/public/docs/js/latest/cookbook/ts-to-js.jade +++ b/public/docs/js/latest/cookbook/ts-to-js.jade @@ -74,7 +74,7 @@ table(width="100%") In TypeScript code, Angular classes, functions, and other members are imported with TypeScript `import` statements: - 在TypeScript代码中,Angular是利用TypeScript的`import`语句来导入类、函数和其他成员的。 + 在TypeScript代码中,Angular是利用TypeScript的`import`语句来导入类、函数和其它成员的。 +makeExample('cb-ts-to-js/ts/app/main.ts', 'ng2import')(format="." ) diff --git a/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade b/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade index 6a72b68e61..d5195f5792 100644 --- a/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade +++ b/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade @@ -706,7 +706,7 @@ table(width="100%") If that methods returns `false`, the template displays "No movie, sorry!". 在这个例子中,如果`favoriteHero`没有设置,则模板显示“Please enter ...”。 - 如果`favoriteHero`设置过,它就会通过调用一个控制其方法来检查他是否电影里的英雄。 + 如果`favoriteHero`设置过,它就会通过调用一个控制其方法来检查它是否电影里的英雄。 如果该方法返回`true`,模板就会显示“Excellent choice!”。 如果该方法返回`false`,该模板就会显示“No movie, sorry!”。 @@ -1017,7 +1017,7 @@ table(width="100%") :marked In Angular 1, an Angular module keeps track of controllers, services, and other code. The second argument defines the list of other modules that this module depends upon. - 在Angular 1中,Angular模块用来对控制器、服务和其他代码进行跟踪。第二个参数定义该模块依赖的其它模块列表。 + 在Angular 1中,Angular模块用来对控制器、服务和其它代码进行跟踪。第二个参数定义该模块依赖的其它模块列表。 td :marked diff --git a/public/docs/ts/latest/cookbook/dependency-injection.jade b/public/docs/ts/latest/cookbook/dependency-injection.jade index bbd76b9519..71410a9d4a 100644 --- a/public/docs/ts/latest/cookbook/dependency-injection.jade +++ b/public/docs/ts/latest/cookbook/dependency-injection.jade @@ -356,7 +356,7 @@ figure.image-display This much Dependency Injection knowledge may be all that many Angular developers ever need to build their applications. It doesn't always have to be more complicated. - 对一些Angular开发者来说,这么多依赖注入知识可能已经是他们需要知道的全部了。不是每个人都需要更复杂的用法。 + 对一些Angular开发者来说,这么多依赖注入知识可能已经是它们需要知道的全部了。不是每个人都需要更复杂的用法。 .l-main-section @@ -915,7 +915,7 @@ a(id='usefactory') Look at the for the full source code. - 该函数从`HeroService`获取英雄参赛者,从中取`2`个作为亚军,并把他们的名字拼接起来。请到查看全部原代码。 + 该函数从`HeroService`获取英雄参赛者,从中取`2`个作为亚军,并把它们的名字拼接起来。请到查看全部原代码。 a(id="tokens") .l-main-section @@ -1309,7 +1309,7 @@ a(id="parent-tree") That means he must both *inject* the `Parent` *class-interface* to get *Alice* and *provide* a `Parent` to satisfy *Carol*. - *Barry*是个问题。他需要访问它的父组件*Alice*,但同时它也是*Carol*的父组件。这个意味着它必须同时*注入*`Parent`*类-接口*来获取*Alice*,和*提供*一个`Parent`来满足*Carol*。 + *Barry*是个问题。它需要访问它的父组件*Alice*,但同时它也是*Carol*的父组件。这个意味着它必须同时*注入*`Parent`*类-接口*来获取*Alice*,和*提供*一个`Parent`来满足*Carol*。 Here's *Barry*: diff --git a/public/docs/ts/latest/cookbook/ngmodule-faq.jade b/public/docs/ts/latest/cookbook/ngmodule-faq.jade index a24c5c8040..835a36f13a 100644 --- a/public/docs/ts/latest/cookbook/ngmodule-faq.jade +++ b/public/docs/ts/latest/cookbook/ngmodule-faq.jade @@ -1262,7 +1262,7 @@ a#q-module-recommendations 真实世界中的模块通常会偏离这些指导原则,而混杂多种不同的类型。 这些只是指导原则,不是硬性要求。 - 但除非你有充分的理由不这么做,最好还是遵循他们。 + 但除非你有充分的理由不这么做,最好还是遵循它们。 table tr @@ -1386,7 +1386,7 @@ table Ideally they consist entirely of _providers_ and have no _declarations_. The `CoreModule` and Angular's `HttpModule` are good examples. - 理想情况下,他们应该完全由`providers`组成,不应该包括`declarations`。 + 理想情况下,它们应该完全由`providers`组成,不应该包括`declarations`。 `CoreModule`和Angular的`HttpModule`就是很好的例子。 Service Modules should _only_ be imported by the root `AppModule`. @@ -1618,7 +1618,7 @@ code-example(format='.'). The provided services do not belong to the module nor are they scoped to the declared classes. They are available _everywhere_. - 这些提供的服务不仅仅从属于当前模块,其作用范围也不局限于模块中声明的类。他们*在哪里*都能用。 + 这些提供的服务不仅仅从属于当前模块,其作用范围也不局限于模块中声明的类。它们*在哪里*都能用。 :marked Here's an _Angular Module_ class with imports, exports, and declarations. @@ -1922,7 +1922,7 @@ table Routed components are also _entry components_ because they aren't referenced in a template either. The router creates them and drops them into the DOM near a ``. - 路由组件同样是*入口组件*,因为他们也不会被从模板中引用。 + 路由组件同样是*入口组件*,因为它们也不会被从模板中引用。 路由器创建会它们,并把它们扔到DOM中的``。 While the bootstrapped and routed components are _entry components_, diff --git a/public/docs/ts/latest/guide/architecture.jade b/public/docs/ts/latest/guide/architecture.jade index bf5cf37cbc..82434e125f 100644 --- a/public/docs/ts/latest/guide/architecture.jade +++ b/public/docs/ts/latest/guide/architecture.jade @@ -325,7 +325,7 @@ figure For example, this `HeroListComponent` has a `heroes` property that returns !{_an} !{_array} of heroes that it acquires from a service. `HeroListComponent` also has a `selectHero()` method that sets a `selectedHero` property when the user clicks to choose a hero from that list. - 例如,`HeroListComponent`有一个`heroes`属性,它返回一个“英雄”数组,这个数组是由一个服务提供的。`HeroListComponent`还有一个`selectHero()`方法,当用户从列表中点选一个英雄时,就把他/她设置到`selectedHero`属性。 + 例如,`HeroListComponent`有一个`heroes`属性,它返回一个“英雄”数组,这个数组是由一个服务提供的。`HeroListComponent`还有一个`selectHero()`方法,当用户从列表中点选一个英雄时,就把它/她设置到`selectedHero`属性。 +makeExcerpt('app/hero-list.component.ts', 'class') :marked @@ -771,7 +771,7 @@ figure It delegates everything nontrivial to services. 组件的任务就是提供用户体验,仅此而已。它介于视图(由模板渲染)和应用逻辑(通常包括_模型(model)_的观念)之间。 - 设计良好的组件为数据绑定提供属性和方法,把那些其他对它们不重要的事情都委托给服务。 + 设计良好的组件为数据绑定提供属性和方法,把那些其它对它们不重要的事情都委托给服务。 Angular doesn't *enforce* these principles. It won't complain if you write a "kitchen sink" component with 3000 lines. diff --git a/public/docs/ts/latest/guide/attribute-directives.jade b/public/docs/ts/latest/guide/attribute-directives.jade index 379ec3ac54..4f1e373db5 100644 --- a/public/docs/ts/latest/guide/attribute-directives.jade +++ b/public/docs/ts/latest/guide/attribute-directives.jade @@ -172,7 +172,7 @@ p p | `@Directive`元数据的后面就是指令的控制器类,它包括了指令的工作逻辑。 +ifDocsFor('ts') - | 我们导出`HighlightDirective`以便让它可以被其他组件访问。 + | 我们导出`HighlightDirective`以便让它可以被其它组件访问。 :marked Angular creates a new instance of the directive's controller class for each matching element, injecting an Angular `ElementRef` and `Renderer` @@ -631,7 +631,7 @@ a#why-input 出乎意料的是,有些人(可能因为太天真)开始绑定到这个指令中的*每一个*属性。 不仅仅只是我们预期为绑定目标的那一两个属性,而是*每一个*。 - 这可能会扰乱指令的工作方式 —— 我们既不想这样做也不想支持他们这样做。 + 这可能会扰乱指令的工作方式 —— 我们既不想这样做也不想支持它们这样做。 The *input* declaration ensures that consumers of our directive can only bind to the properties of our public API ... nothing else. diff --git a/public/docs/ts/latest/guide/component-styles.jade b/public/docs/ts/latest/guide/component-styles.jade index 7419c28582..f16bb725dd 100644 --- a/public/docs/ts/latest/guide/component-styles.jade +++ b/public/docs/ts/latest/guide/component-styles.jade @@ -271,7 +271,7 @@ block module-bundlers Users of module bundlers like Webpack may also use the `styles` attribute to load styles from external files at build time. They could write: - 像Webpack这类模块打包器的用户可能会使用`styles`属性来在构建时从外部文件中加载样式。他们可能这样写: + 像Webpack这类模块打包器的用户可能会使用`styles`属性来在构建时从外部文件中加载样式。它们可能这样写: `styles: [require('my.component.css')]` diff --git a/public/docs/ts/latest/guide/dependency-injection.jade b/public/docs/ts/latest/guide/dependency-injection.jade index f605db77e7..82d1c6da0e 100644 --- a/public/docs/ts/latest/guide/dependency-injection.jade +++ b/public/docs/ts/latest/guide/dependency-injection.jade @@ -91,7 +91,7 @@ block includes 现在,每辆车都有它自己的引擎。它不能和其它车辆共享引擎。 虽然这对于汽车来说还算可以理解,但是我们设想一下那些应该被共享的依赖,比如用来联系厂家服务中心的车载无线。 - 我们的车缺乏必要的弹性,无法共享当初给其他消费者创建的车载无线。 + 我们的车缺乏必要的弹性,无法共享当初给其它消费者创建的车载无线。 When we write tests for our `Car` we're at the mercy of its hidden dependencies. Is it even possible to create a new `Engine` in a test environment? @@ -1148,7 +1148,7 @@ block dart-diff-const-metadata-ctor They can be object literals  such as this one: 应用程序经常为很多很小的因素(比如应用程序的标题,或者一个网络API终点的地址)定义配置对象,但是这些配置对象不总是类的实例。 - 他们可能是对象,比如下面这个: + 它们可能是对象,比如下面这个: +makeExample('dependency-injection/ts/app/app.config.ts','config','app/app-config.ts (excerpt)')(format='.') @@ -1354,7 +1354,7 @@ block one-class-per-file-ts-tradeoffs Developers expect one class per file. Keep them happy. 在同一个文件中有多个类容易造成混淆,最好避免。 - 开发人员期望每个文件只放一个类。这会让他们开心点。 + 开发人员期望每个文件只放一个类。这会让它们开心点。 If we scorn this advice and, say, diff --git a/public/docs/ts/latest/guide/forms.jade b/public/docs/ts/latest/guide/forms.jade index 5922e43673..91119ca67e 100644 --- a/public/docs/ts/latest/guide/forms.jade +++ b/public/docs/ts/latest/guide/forms.jade @@ -99,7 +99,7 @@ figure.image-display Here at the *Hero Employment Agency* we use this form to maintain personal information about the heroes in our stable. Every hero needs a job. It's our company mission to match the right hero with the right crisis! - 这里是*英雄管理局*,我们使用这个表单来维护候选英雄们的个人信息。每个英雄都需要一份工作。我们公司的任务就是让适当的英雄去解决他/她所擅长应对的危机! + 这里是*英雄管理局*,我们使用这个表单来维护候选英雄们的个人信息。每个英雄都需要一份工作。我们公司的任务就是让适当的英雄去解决它/她所擅长应对的危机! Two of the three fields on this form are required. Required fields have a green bar on the left to make them easy to spot. @@ -181,7 +181,7 @@ include ../_quickstart_repo As users enter form data, we capture their changes and update an instance of a model. We can't layout the form until we know what the model looks like. - 当用户输入表单数据时,我们要捕获他们的变化,并更新到模型的一个实例中。 + 当用户输入表单数据时,我们要捕获它们的变化,并更新到模型的一个实例中。 除非我们知道模型里有什么,否则无法设计表单。 A model can be as simple as a "property bag" that holds facts about a thing of application importance. @@ -399,7 +399,7 @@ code-example(format=""). That is plain old HTML 5. We're presenting two of the `Hero` fields, `name` and `alterEgo`, and opening them up for user input in input boxes. - 这只是一段普通的旧式HTML 5代码。这里出现了两个`Hero`字段,`name`和`alterEgo`,让用户可以在输入框中输入,修改他们。 + 这只是一段普通的旧式HTML 5代码。这里出现了两个`Hero`字段,`name`和`alterEgo`,让用户可以在输入框中输入,修改它们。 The *Name* `` control has the HTML5 `required` attribute; the *Alter Ego* `` control does not because `alterEgo` is optional. @@ -932,7 +932,7 @@ figure.image-display Hiding the message while the control is "pristine" achieves that goal. We'll see the significance of this choice when we [add a new hero](#new-hero) to the form. - 有些人会为这种行为感到不安。他们希望只有在用户做出一个无效的更改时才显示这个消息。如果当控件是“全新”状态时也隐藏消息,就能达到这个目的。 + 有些人会为这种行为感到不安。它们希望只有在用户做出一个无效的更改时才显示这个消息。如果当控件是“全新”状态时也隐藏消息,就能达到这个目的。 在往表单中[添加一个新英雄](#new-hero)时,我们将看到这种选择的重要性。 The Hero *Alter Ego* is optional so we can leave that be. diff --git a/public/docs/ts/latest/guide/lifecycle-hooks.jade b/public/docs/ts/latest/guide/lifecycle-hooks.jade index a85fc99da0..d6e3e5ece9 100644 --- a/public/docs/ts/latest/guide/lifecycle-hooks.jade +++ b/public/docs/ts/latest/guide/lifecycle-hooks.jade @@ -309,7 +309,7 @@ a(id="other-lifecycles") :marked ## Other lifecycle hooks - ## 其他生命周期钩子 + ## 其它生命周期钩子 Other Angular sub-systems may have their own lifecycle hooks apart from the component hooks we've listed. @@ -720,7 +720,7 @@ figure.image-display to the hero or the power so we can keep an eye on the method's performance characteristics. 我们手动检测了自己关心的一切,捕获当前值并与以前的值进行比较。 - 当英雄或他的超能力发生了非实质性改变时,我们就往日志中写一条特殊的消息,以便看到该方法的工作特征。 + 当英雄或它的超能力发生了非实质性改变时,我们就往日志中写一条特殊的消息,以便看到该方法的工作特征。 The results are illuminating: diff --git a/public/docs/ts/latest/guide/ngmodule.jade b/public/docs/ts/latest/guide/ngmodule.jade index da74ef91b9..549765bd77 100644 --- a/public/docs/ts/latest/guide/ngmodule.jade +++ b/public/docs/ts/latest/guide/ngmodule.jade @@ -148,7 +148,7 @@ a#angular-modularity * import other modules with the components, directives and pipes needed by the components in _this_ module. - * 导入其它模块,从其他模块总获得本模块所需的组件、指令和管道。 + * 导入其它模块,从其它模块总获得本模块所需的组件、指令和管道。 * provide services at the application level that any application component can use. @@ -924,7 +924,7 @@ a#feature-modules 2. A feature module can expose or hide its implementation from other modules. - 2. 特性模块可以对其他模块暴露或隐藏自己的实现。 + 2. 特性模块可以对其它模块暴露或隐藏自己的实现。 Otherwise, a feature module is distinguished primarily by its intent. diff --git a/public/docs/ts/latest/guide/npm-packages.jade b/public/docs/ts/latest/guide/npm-packages.jade index ccc613e58e..f9d7435ce4 100644 --- a/public/docs/ts/latest/guide/npm-packages.jade +++ b/public/docs/ts/latest/guide/npm-packages.jade @@ -150,7 +150,7 @@ a(id="dependencies") ***[system.js](https://github.com/systemjs/systemjs)*** - 是一个动态的模块加载器, 与[ES2015模块](http://www.2ality.com/2014/09/es6-modules-final.html)规范兼容。 - 还有很多其他选择,比如广受欢迎的[webpack](https://webpack.github.io/)。 + 还有很多其它选择,比如广受欢迎的[webpack](https://webpack.github.io/)。 SystemJS被用在了我们的文档范例中。因为它能工作。 Your future applications are likely to require additional packages that provide @@ -363,7 +363,7 @@ a(id="why-peer-dependencies") When the application or any of its other dependencies installs a different version of a *peer dependency*. - 幸运的是,*npm*会在下列情况下给我们警告:(a) 当任何*平级依赖*缺失时 或(b) 当应用程序或它的任何其他依赖安装了与*平级依赖*不同版本的包时。 + 幸运的是,*npm*会在下列情况下给我们警告:(a) 当任何*平级依赖*缺失时 或(b) 当应用程序或它的任何其它依赖安装了与*平级依赖*不同版本的包时。 These warnings guard against accidental failures due to version mismatches. They leave you in control of package and version resolution. @@ -382,7 +382,7 @@ a(id="why-peer-dependencies") The Angular polyfill dependencies are hard requirements. Currently, there is no way to make them optional. - Angular的填充库依赖只是一个给开发人员的建议或提示,以便他们知道Angular期望用什么。 + Angular的填充库依赖只是一个给开发人员的建议或提示,以便它们知道Angular期望用什么。 它们不应该像现在一样是硬需求,但目前我们也不知道该如何把它们设置为可选的。 However, there is an npm feature request for "optional peerDependencies," which would allow you to model this relationship better. diff --git a/public/docs/ts/latest/guide/router.jade b/public/docs/ts/latest/guide/router.jade index 47f6de4489..dcc867c461 100644 --- a/public/docs/ts/latest/guide/router.jade +++ b/public/docs/ts/latest/guide/router.jade @@ -597,7 +597,7 @@ table Heroes need work and The Agency finds Crises for them to solve. 我们的客户是“英雄管理局”。 - 英雄们需要找工作,而“英雄管理局”为他们寻找待解决的危机。 + 英雄们需要找工作,而“英雄管理局”为它们寻找待解决的危机。 The application has three main feature areas: @@ -866,7 +866,7 @@ a#base-href which returns a module containing the configured `Router` service provider ... and some other, unseen providers that the routing library requires. We export this as the `routing` token. - 下面是第一种配置。将路由数组传进`RouterModule.forRoot`方法,它将返回一个路由器需要的模块,该模块包含了配置好的`Router`服务提供商和一些其他不可见的提供商。我们将它导出为`routing`常量。 + 下面是第一种配置。将路由数组传进`RouterModule.forRoot`方法,它将返回一个路由器需要的模块,该模块包含了配置好的`Router`服务提供商和一些其它不可见的提供商。我们将它导出为`routing`常量。 +makeExcerpt('app/app.routing.2.ts') @@ -1109,7 +1109,7 @@ h3#router-directives 路由器指令集 The rest of the starter app is mundane, with little interest from a router perspective. Here are the details for readers inclined to build the sample through to this milestone. - 这个初学者应用的其他部分有点平淡无奇,从路由器的角度来看也很平淡。 + 这个初学者应用的其它部分有点平淡无奇,从路由器的角度来看也很平淡。 如果你还是倾向于在这个里程碑里构建它们,参见下面的构建详情。 Our starter app's structure looks like this: @@ -1284,7 +1284,7 @@ figure.image-display It doesn't need any outside information. 新的“英雄”特性有两个相互协作的组件,列表和详情。 - 列表视图是自给自足的,我们导航到它,它会自行获取英雄列表并显示他们,该组件不需要任何外部信息。 + 列表视图是自给自足的,我们导航到它,它会自行获取英雄列表并显示它们,该组件不需要任何外部信息。 The detail view is different. It displays a particular hero. It can't know which hero on its own. That information must come from outside. @@ -2228,7 +2228,7 @@ h3#merge-hero-routes 把hero模块导入到AppModule中 * The router should block access to certain features until the user logs-in. - * 如果用户尚未登录,路由器就应该阻止他访问某些特性。 + * 如果用户尚未登录,路由器就应该阻止它访问某些特性。 * Our `CrisisService` is only needed within the *Crisis Center* module. We should limit access to it to that module. @@ -2943,7 +2943,7 @@ h3#component-less-route 无组件路由: 不借助组件对路由进行 Instead we'll write a `CanActivate` guard to redirect anonymous users to the login page when they try to reach the admin component. - 我们换种方式:写一个`CanActivate`守卫,当匿名用户尝试访问管理组件时,把他/她重定向到登录页。 + 我们换种方式:写一个`CanActivate`守卫,当匿名用户尝试访问管理组件时,把它/她重定向到登录页。 This is a general purpose guard — we can imagine other features that require authenticated users — so we create an `auth-guard.service.ts` in the application root folder. @@ -3241,7 +3241,7 @@ a#CanDeactivate But it can also return a `Promise` or an `Observable` and the router will wait for that to resolve to truthy (navigate) or falsey (stay put). - 注意,`canDeactivate`方法*可以*同步返回,如果没有危机,或者没有未定的修改,它就立即返回`true`。但是他也可以返回一个承诺(`Promise`)或可观察对象(`Observable`),路由器将等待它们被解析为真值(继续导航)或假值(留下)。 + 注意,`canDeactivate`方法*可以*同步返回,如果没有危机,或者没有未定的修改,它就立即返回`true`。但是它也可以返回一个承诺(`Promise`)或可观察对象(`Observable`),路由器将等待它们被解析为真值(继续导航)或假值(留下)。 :marked We add the `Guard` to our crisis detail route in `crisis-center.routing.ts` using the `canDeactivate` array. @@ -3285,7 +3285,7 @@ h3#resolve-guard 解析: 提前获取组件数据 We want to delay rendering of our route component until all necessary data has been fetched or some action has occurred. - 可以预先从服务器读取数据,这样在路由器被激活时,数据已经返回。同时,我们还需要处理数据返回失败和其他出错情况。这样,在`Crisis Center`中,对处理导航到一个无返回数据的`id`有帮助。 + 可以预先从服务器读取数据,这样在路由器被激活时,数据已经返回。同时,我们还需要处理数据返回失败和其它出错情况。这样,在`Crisis Center`中,对处理导航到一个无返回数据的`id`有帮助。 我们可以将用户发回只列出有效危机的`Crisis List`。 直到成功获取所有必须的数据或一些行为已经发生,应用需要延迟渲染路由组件。 @@ -3300,7 +3300,7 @@ h3#resolve-guard 解析: 提前获取组件数据 We'll update our `Crisis Detail` route to resolve our Crisis before loading the route, or if the user happens to navigate to an invalid crisis center `:id`, we'll navigate back to our list of existing crises. - 我们需要更新`Crisis Detail`路由,让它先解析必要的危机,再加载路由。或者当用户导航到一个无效的危机`:id`时,将他们导航回危机列表。 + 我们需要更新`Crisis Detail`路由,让它先解析必要的危机,再加载路由。或者当用户导航到一个无效的危机`:id`时,将它们导航回危机列表。 Like the `CanActivate` and `CanDeactivate` guards, the **`Resolve`** guard is an interface we can implement as a service to resolve route data synchronously or asynchronously. In `CrisisDetailComponent`, we used the `ngOnInit` to retrieve the `Crisis` @@ -3600,7 +3600,7 @@ a#fragment Angular provides a built-in module loader that supports **`SystemJS`** to load modules asynchronously. If we were using another bundling tool, such as **Webpack**, we would use the Webpack mechanism for asynchronously loading modules. - Angular提供一个内置模块加载器,支持**`SystemJS`**来异步加载模块。如果我们使用其他捆绑工具比如**Webpack**,则使用Webpack的机制来异步加载模块。 + Angular提供一个内置模块加载器,支持**`SystemJS`**来异步加载模块。如果我们使用其它捆绑工具比如**Webpack**,则使用Webpack的机制来异步加载模块。 :marked We've built our feature area, we've updated our route configuration to take advantage of lazy-loading, now we have to do the final step @@ -3988,11 +3988,11 @@ code-example(format=".", language="bash"). Some developers may not be able to add the `` element, perhaps because they don't have access to `` or the `index.html`. - 有些开发人员可能无法添加``元素,这可能是因为他们没有访问``或`index.html`的权限。 + 有些开发人员可能无法添加``元素,这可能是因为它们没有访问``或`index.html`的权限。 Those developers may still use HTML 5 URLs by taking two remedial steps: - 他们仍然可以使用HTML 5格式的URL,但要采取两个步骤进行补救: + 它们仍然可以使用HTML 5格式的URL,但要采取两个步骤进行补救: 1. Provide the router with an appropriate `APP_BASE_HREF` value. diff --git a/public/docs/ts/latest/guide/security.jade b/public/docs/ts/latest/guide/security.jade index 9fae8c7cfb..9928dd4dc1 100644 --- a/public/docs/ts/latest/guide/security.jade +++ b/public/docs/ts/latest/guide/security.jade @@ -99,7 +99,7 @@ h2#xss 防范跨站脚本(XSS)攻击 common attacks on the web. [跨站脚本(XSS)](https://en.wikipedia.org/wiki/Cross-site_scripting)允许攻击者将恶意代码注入到页面中。这些代码可以偷取用户数据 - (特别是他们的登录数据),还可以冒充用户执行操作。它是Web上最常见的攻击方式之一。 + (特别是它们的登录数据),还可以冒充用户执行操作。它是Web上最常见的攻击方式之一。 To block XSS attacks, you must prevent malicious code from entering the DOM(Document Object Model). For example, if an attacker can trick you into inserting a `