Git Product home page Git Product logo

angular-cn's Introduction

注意

根据最新政策,中文翻译站已经独立运营,本仓库即将锁定,请转到 https://github.com/ng-docs/angular-cn ,谢谢!

master分支下是老版本的文档,新版本的文档位于aio分支下。目前aio只是部署到了 https://angular.cn,但尚未撰写中文的部署指南,不过你可以尝试自行按照英文版的readme.md进行部署。

angular.io 中文版

这里是 angular.io 字幕组,哦不对,是汉化组。译者汪志成 (雪狼)、叶志敏 (Rex) 和杨林 (todoubaba) 欢迎您的到访。

我们将和官方英文版保持同步翻译,并同步发布到国内镜像 - https://angular.cn

授权协议

本文档遵循“保持署名—非商用”创意共享4.0许可证(CC BY-NC 4.0),请在保持署名非商用的前提下自由使用,你甚至可以把它架设在自己的电脑或内网服务器上。

特别是:

  • 不得去掉“关于中文版”的入口链接,也不得增删改“关于中文版”页的内容。
  • 如果您是**商业网站(包括但不限于任何有广告或收费的网站)**要发布或转载,请联系我们 [email protected][email protected]

违反上述授权协议将面临法律追究。

编译与发布

  1. git clone https://github.com/angular/angular-cn.git把本项目取到本地。
  2. git clone https://github.com/angular/angular.git把 Angular 的源码取到本地。它将用来编译出 API 文档。
  3. 进入angular-cn目录
  4. 运行npm install安装依赖包
  5. 运行gulp serve-and-sync-devguide命令进行本地预览
  6. 运行gulp build-compile --lang="(ts|js)"命令进行编译
  7. ./www目录发布到任何静态文件服务器上

如果是内网服务器,你还可以通过自建 CI 进行同步更新。

更多信息

关于本中文版以及三位译者的更多信息,请参见“关于中文版”链接。

angular-cn's People

Contributors

alexanderlukin avatar alexwolfe avatar asnowwolf avatar bampakoa avatar brandonroberts avatar chalin avatar davideast avatar deborahk avatar dreamapplehappy avatar filipesilva avatar foxandxss avatar igorminar avatar jeffbcross avatar johnpapa avatar jtraband avatar juleskremer avatar kapunahelewong avatar kwalrath avatar naomiblack avatar petebacondarwin avatar rexebin avatar shairez avatar teresahu avatar teropa avatar thelgevold avatar thso avatar todoubaba avatar tomplusplus avatar trotyl avatar wardbell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-cn's Issues

教程-英雄编辑器-双向绑定 节的翻译有遗漏

原教程中有一段:
Before we can use two-way data binding for form inputs, we need to import the FormsModule package in our Angular module. We add it to the NgModule decorator's imports array. This array contains the list of external modules used by our application. Now we have included the forms package which includes ngModel.

中文版中没有,如果少了这段,程序执行会出错。

文档中的路由与导航代码

文档-开发指南-路由与导航

在“把英雄区的路由合并到应用程序的路由中” 下面的
app/app.routes.ts (v.2)代码应该是不对的

英文版的是对的

关于angular2 依赖注入的问题

你好:
我在中文官网中按照 Visual Studio 2015 中新建 angular2 quickstart 项目并架设到本地IIS,并能很好的运行,但在我添加其他组件并需要注入http组件时,则出现“Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'DemoService' is decorated with Injectable”错误,
后来我尝试使用 npm start 编译并启动 quickstart 项目时,却能很好的运行。
关于使用visual studio 编译typescript 和 npm 在注入方面有什么区别吗,或您有关于此问题的建议吗?

对于可能的angular2启动错误问题的解决

我的angular 1.0.0不能启动,后来搜索了网上大家的办法。
Windows环境下:
1.首先确认下 PATH环境变量有没有angular2里的node_module下的.bin目录,没有的话添加上去,然后在运行,看看如果还出错的话,错误信息也没有变化。(一般这个办法对应的ENOXXX这个错误)。
2.更改package.json文件

"scripts": {
"start": "tsc && concurrently "npm run tsc:w" "npm run lite" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
},
to

"scripts": {
"start": "concurrently "npm run tsc:w" "npm run lite" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
},

非Windows系统。
要修改系统的watch数量。。
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

最后个方法,直接用lite-server(不能启动lite-server多半是PATH的问题)启动,angular2的模块是可以加载了,不过我不太确定这样会不会缺少一些其他模块。

教程中路由解释有误

name在最新的angular中已经不支持了

这个 RouteConfig 是一个 路由定义 的数组。 此刻我们只有一个路由定义,但别急,后面还会添加更多。

“路由定义”包括两个部分:

path: 路由器会用它来匹配路由中指定的路径和浏览器地址栏中的当前路径,如 /heroes 。

name: 路由的正式名字,它 必须 以大写字母开头儿,以免和 path 混淆 , 如 Heroes 。

component: 导航到此路由时,路由器需要创建的组件,如 HeroesComponent 。

感谢angular-cn的翻译!

运行gulp check-deploy命令进行编译时出现报错

$ gulp check-deploy
D:\test\angular-cn\gulpfile.js:514
spawnInfo = spawnExt('npm', ['install', ...sources], {cwd: EXAMPLES_PATH});
^^^

SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Liftoff.handleArguments (C:\Users\fengjie.liu\AppData\Roaming\npm\node_modules.gulp_npminstall\g ulp\3.9.1\gulp\bin\gulp.js:116:3)
at Liftoff. (C:\Users\fengjie.liu\AppData\Roaming\npm\node_modules.gulp_npminstall\lifto ff\2.2.4\liftoff\index.js:193:16)
at module.exports (C:\Users\fengjie.liu\AppData\Roaming\npm\node_modules.gulp_npminstall\flagged-re spawn\0.3.2\flagged-respawn\index.js:17:3)

$ gulp check-deploy
[17:26:34] Building docs for: ts|js|dart
D:\test\angular-cn\gulpfile.js:1443
throw new Error('API related tasks require the angular2 repo to be at ' + ngPath);
^

Error: API related tasks require the angular2 repo to be at D:/test/angular-dart
at checkAngularProjectPath (D:\test\angular-cn\gulpfile.js:1443:9)
at configLangs (D:\test\angular-cn\gulpfile.js:131:5)
at Object. (D:\test\angular-cn\gulpfile.js:134:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Liftoff.handleArguments (C:\Users\fengjie.liu\AppData\Roaming\npm\node_modules.gulp_npminstall\g ulp\3.9.1\gulp\bin\gulp.js:116:3)
at Liftoff. (C:\Users\fengjie.liu\AppData\Roaming\npm\node_modules.gulp_npminstall\lifto ff\2.2.4\liftoff\index.js:193:16)
at module.exports (C:\Users\fengjie.liu\AppData\Roaming\npm\node_modules.gulp_npminstall\flagged-re spawn\0.3.2\flagged-respawn\index.js:17:3)
at Liftoff. (C:\Users\fengjie.liu\AppData\Roaming\npm\node_modules.gulp_npminstall\lifto ff\2.2.4\liftoff\index.js:185:9)
at C:\Users\fengjie.liu\AppData\Roaming\npm\node_modules.gulp_npminstall\liftoff\2.2.4\liftoff\inde x.js:159:9
at C:\Users\fengjie.liu\AppData\Roaming\npm\node_modules.gulp_npminstall\v8flags\2.0.11\v8flags\ind ex.js:108:14
at C:\Users\fengjie.liu\AppData\Roaming\npm\node_modules.gulp_npminstall\v8flags\2.0.11\v8flags\ind ex.js:36:12

不知道是不是修bug 时带上去的

管道章节其中一些还没翻译

管道这章
https://angular.cn/docs/ts/latest/guide/pipes.html

其中这几段还没翻译:
Clearly some values benefit from a bit of massage. We soon discover that we desire many of the same transformations repeatedly, both within and across many applications. We almost think of them as styles. In fact, we'd like to apply them in our HTML templates as we do styles.

Angular reports an error if we neglect to list our custom pipe. We didn't list the DatePipe in our previous example because all Angular built-in pipes are pre-registered. Custom pipes must be registered manually.

If we try the 在线例子, we can probe its behavior by changing the value and the optional exponent in the template.

纠错-(教程-5.服务)

providers 数组告诉 Angular ,当它创建新的 AppComponent 组件时,也要创建一个 HeroService 的新实例。 AppComponent 会使用那个服务来**获取影响列表**,在它组件树中的每一个子组件也同样如此。

我对照下面的英文,这块应该是敲错了, service to get heroes

中英文混合时请在英文前后加上一个英文 Space

如:Angular指南
变更为: Angular 指南

十几前年,我翻译 Spring Live 的时候就发现中英文混合在 PDF 中十分别扭,当然在浏览器好一点。其实一些国内中文翻译时几乎约定加上一个空格。

这里是不是描述不对啊

应该是html里的attr 和class的property吧

原文
译注

由于HTML的Attribute和DOM的Property在中文中都被翻译成了“属性”,无法加以区分,而接下来的部分重点是对它们进行比较的。

模板语法 - Attribute 绑定 章节错误

正如消息中所说, 元素没有 colspan Attribute 。 但是插值表达式和属性绑定只能设置 属性 ,而不是 Attribute 。

As the message says, the element does not have a colspan property. It has the "colspan" attribute, but interpolation and property binding can set only properties, not attributes.

更正:正如消息中所说, 元素没有 colspan Property 。他只有 colspan Attribute, 但是插值表达式和属性绑定只能设置 Property ,而不能设置 Attribute 。

不得不说这翻译看得我完全不知所措~~
然后不严谨的话,请不要用“由于我们对翻译质量的极端要求”这样的描述。

quickstart 项目 执行npm start的时候无法将ts文件转换成js文件

$ npm start

[email protected] start C:\My\Angular2\heroes
tsc && concurrently "npm run tsc:w" "npm run lite"

Version 1.8.10
Syntax: tsc [options] [file ...]

Examples: tsc hello.ts
tsc --out file.js file.ts
tsc @args.txt

Options:
--allowJs Allow javascript files to be compiled.
--allowSyntheticDefaultImports Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
--allowUnreachableCode Do not report errors on unreachable code.
--allowUnusedLabels Do not report errors on unused labels.
-d, --declaration Generates corresponding '.d.ts' file.
--experimentalDecorators Enables experimental support for ES7 decorators.
--forceConsistentCasingInFileNames Disallow inconsistently-cased references to the same file.
-h, --help Print this message.
--init Initializes a TypeScript project and creates a tsconfig.json file.
--jsx KIND Specify JSX code generation: 'preserve' or 'react'
--mapRoot LOCATION Specifies the location where debugger should locate map files instead of generated locations.
-m KIND, --module KIND Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'
--moduleResolution Specifies module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).
--newLine NEWLINE Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).
--noEmit Do not emit outputs.
--noEmitOnError Do not emit outputs if any errors were reported.
--noFallthroughCasesInSwitch Report errors for fallthrough cases in switch statement.
--noImplicitAny Raise error on expressions and declarations with an implied 'any' type.
--noImplicitReturns Report error when not all code paths in function return a value.
--noImplicitUseStrict Do not emit 'use strict' directives in module output.
--outDir DIRECTORY Redirect output structure to the directory.
--outFile FILE Concatenate and emit output to single file.
--preserveConstEnums Do not erase const enum declarations in generated code.
--pretty KIND Stylize errors and messages using color and context. (experimental)
-p DIRECTORY, --project DIRECTORY Compile the project in the given directory.
--reactNamespace Specifies the object invoked for createElement and __spread when targeting 'react' JSX emit
--removeComments Do not emit comments to output.
--rootDir LOCATION Specifies the root directory of input files. Use to control the output directory structure with --outDir.
--sourceMap Generates corresponding '.map' file.
--sourceRoot LOCATION Specifies the location where debugger should locate TypeScript files instead of source locations.
--suppressImplicitAnyIndexErrors Suppress noImplicitAny errors for indexing objects lacking index signatures.
-t VERSION, --target VERSION Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015' (experimental)
-v, --version Print the compiler's version.
-w, --watch Watch input files.
@ Insert command line options and files from a file.
[1]
[1] > [email protected] lite C:\My\Angular2\heroes
[1] > lite-server
[1]
[0]
[0] > [email protected] tsc:w C:\My\Angular2\heroes
[0] > tsc -w
[0]
[0] Version 1.8.10
[0] Syntax: tsc [options] [file ...]
[0]
[0] Examples: tsc hello.ts
[0] tsc --out file.js file.ts
[0] tsc @args.txt
[0]
[0] Options:
[0] --allowJs Allow javascript files to be compiled.
[0] --allowSyntheticDefaultImports Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
[0] --allowUnreachableCode Do not report errors on unreachable code.
[0] --allowUnusedLabels Do not report errors on unused labels.
[0] -d, --declaration Generates corresponding '.d.ts' file.
[0] --experimentalDecorators Enables experimental support for ES7 decorators.
[0] --forceConsistentCasingInFileNames Disallow inconsistently-cased references to the same file.
[0] -h, --help Print this message.
[0] --init Initializes a TypeScript project and creates a tsconfig.json file.
[0] --jsx KIND Specify JSX code generation: 'preserve' or 'react'
[0] --mapRoot LOCATION Specifies the location where debugger should locate map files instead of generated locations.
[0] -m KIND, --module KIND Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'
[0] --moduleResolution Specifies module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).
[0] --newLine NEWLINE Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).
[0] --noEmit Do not emit outputs.
[0] --noEmitOnError Do not emit outputs if any errors were reported.
[0] --noFallthroughCasesInSwitch Report errors for fallthrough cases in switch statement.
[0] --noImplicitAny Raise error on expressions and declarations with an implied 'any' type.
[0] --noImplicitReturns Report error when not all code paths in function return a value.
[0] --noImplicitUseStrict Do not emit 'use strict' directives in module output.
[0] --outDir DIRECTORY Redirect output structure to the directory.
[0] --outFile FILE Concatenate and emit output to single file.
[0] --preserveConstEnums Do not erase const enum declarations in generated code.
[0] --pretty KIND Stylize errors and messages using color and context. (experimental)
[0] -p DIRECTORY, --project DIRECTORY Compile the project in the given directory.
[0] --reactNamespace Specifies the object invoked for createElement and __spread when targeting 'react' JSX emit
[0] --removeComments Do not emit comments to output.
[0] --rootDir LOCATION Specifies the root directory of input files. Use to control the output directory structure with --outDir.
[0] --sourceMap Generates corresponding '.map' file.
[0] --sourceRoot LOCATION Specifies the location where debugger should locate TypeScript files instead of source locations.
[0] --suppressImplicitAnyIndexErrors Suppress noImplicitAny errors for indexing objects lacking index signatures.
[0] -t VERSION, --target VERSION Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015' (experimental)
[0] -v, --version Print the compiler's version.
[0] -w, --watch Watch input files.
[0] @ Insert command line options and files from a file.
[0] npm run tsc:w exited with code 0
[1] Did not detect a bs-config.json or bs-config.js override file. Using lite-server defaults...
[1] * browser-sync config **
[1] { injectChanges: false,
[1] files: [ './
/.{html,htm,css,js}' ],
[1] watchOptions: { ignored: 'node_modules' },
[1] server: { baseDir: './', middleware: [ [Function], [Function] ] } }
[1] [BS] Access URLs:
[1] ---------------------------------------
[1] Local: http://localhost:3000
[1] External: http://xxx.xxx.xx.xxx:3000
[1] ---------------------------------------
[1] UI: http://localhost:3001
[1] UI External: http://xxx.xxx.xx.xxx:3001
[1] ---------------------------------------
[1] [BS] Serving files from: ./
[1] [BS] Watching files...
[1] 16.07.21 14:56:51 304 GET /index.html
[1] 16.07.21 14:56:51 304 GET /styles.css
[1] 16.07.21 14:56:51 304 GET /node_modules/core-js/client/shim.min.js
[1] 16.07.21 14:56:51 304 GET /node_modules/zone.js/dist/zone.js
[1] 16.07.21 14:56:51 304 GET /node_modules/systemjs/dist/system.src.js
[1] 16.07.21 14:56:51 304 GET /node_modules/reflect-metadata/Reflect.js
[1] 16.07.21 14:56:51 304 GET /systemjs.config.js
[1] 16.07.21 14:56:52 404 GET /app/main.js

gulp check-deploy 报错

Ubuntu 环境下

wwb@ubuntu:~/gitlearnDemo/angular-cn$ gulp check-deploy
(node:9510) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[18:18:25] Using gulpfile /gitlearnDemo/angular-cn/gulpfile.js
[18:18:25] Starting '_shred-clean-devguide'...
[18:18:25] Starting '_copy-example-boilerplate'...
[18:18:25] Copying example boilerplate files
[18:18:25] Starting '_shred-clean-devguide-shared-jade'...
[18:18:25] Starting '_shred-clean-api'...
[18:18:25] Starting 'build-dart-cheatsheet'...
[18:18:26] { Error: ENOENT: no such file or directory, open '../angular/package.json'
at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.readFileSync (fs.js:502:33)
at packageInfo (/home/wwb/gitlearnDemo/angular-cn/tools/api-builder/angular.io-package/services/packageInfo.js:13:24)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:75:15)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:119:18
at Array.forEach (native)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:118:25
at Array.forEach (native)
at Dgeni.configureInjector (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:117:14)
at Dgeni.generate (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:149:8)
at buildApiDocs (/home/wwb/gitlearnDemo/angular-cn/gulpfile.js:1048:18)
at Gulp. (/home/wwb/gitlearnDemo/angular-cn/gulpfile.js:518:10)
at module.exports (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Function.Module.runMain (module.js:577:11)
at startup (node.js:159:18)
at node.js:444:3
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '../angular/package.json' }
[18:18:26] Error: ENOENT: no such file or directory, open '../angular/package.json'
at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.readFileSync (fs.js:502:33)
at packageInfo (/home/wwb/gitlearnDemo/angular-cn/tools/api-builder/angular.io-package/services/packageInfo.js:13:24)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:75:15)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:119:18
at Array.forEach (native)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:118:25
at Array.forEach (native)
at Dgeni.configureInjector (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:117:14)
at Dgeni.generate (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:149:8)
at buildApiDocs (/home/wwb/gitlearnDemo/angular-cn/gulpfile.js:1048:18)
at Gulp. (/home/wwb/gitlearnDemo/angular-cn/gulpfile.js:518:10)
at module.exports (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Function.Module.runMain (module.js:577:11)
at startup (node.js:159:18)
at node.js:444:3
[18:18:26] 'build-dart-cheatsheet' errored after 397 ms
[18:18:26] Error: ENOENT: no such file or directory, open '../angular/package.json'
at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.readFileSync (fs.js:502:33)
at packageInfo (/home/wwb/gitlearnDemo/angular-cn/tools/api-builder/angular.io-package/services/packageInfo.js:13:24)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:75:15)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at Array.invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at get (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:48:43)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:71:14
at Array.map (native)
at invoke (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/node_modules/di/lib/injector.js:70:31)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:119:18
at Array.forEach (native)
at /home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:118:25
at Array.forEach (native)
at Dgeni.configureInjector (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:117:14)
at Dgeni.generate (/home/wwb/gitlearnDemo/angular-cn/node_modules/dgeni/lib/Dgeni.js:149:8)
at buildApiDocs (/home/wwb/gitlearnDemo/angular-cn/gulpfile.js:1048:18)
at Gulp. (/home/wwb/gitlearnDemo/angular-cn/gulpfile.js:518:10)
at module.exports (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/home/wwb/gitlearnDemo/angular-cn/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Function.Module.runMain (module.js:577:11)
at startup (node.js:159:18)
at node.js:444:3
[18:18:26] Finished '_shred-clean-devguide-shared-jade' after 678 ms
[18:18:26] Finished '_shred-clean-devguide' after 1.03 s
[18:18:26] Finished '_shred-clean-api' after 465 ms
[18:18:26] Finished '_copy-example-boilerplate' after 1.64 s
wwb@ubuntu:
/gitlearnDemo/angular-cn$ gulp check-deploy

路由与导航章节一些还没翻译

https://angular.cn/docs/ts/latest/guide/router.html

这部分还没翻译:

Technically, pathMatch = 'full' results in a route hit when the remaining, unmatched segments of the URL match ''. In our example, the redirect is at the top level of the route configuration tree so the remaining URL and the entire URL are the same thing.

The other possible pathMatch value is 'prefix' which tells the router to match the redirect route when the remaining URL begins with the redirect route's prefix path.

That's not what we want to do here. If the pathMatch value were 'prefix', every URL would match ''. We could never navigate to /crisis-center/1 because the redirect route would match first and send us to the CrisisListComponent.

We should redirect to the CrisisListComponent only when the entire (remaining) url is ''.

Learn more in Victor Savkin's blog post on redirects.

翻译的一点小建议

AppComponent is the root of the application,翻译成AppComponent 是应用的根(基)可能比AppComponent 是应用的根目录要好一点。
AppComponent

[建议] api参考手册部分

image
考虑到最终版发布之后api状态应该都是稳定版,所以最终版本发布以后可以选择将状态隐藏。
因为现在没有发正式版本之前,想要查看api的状态还要点进去比较麻烦。

教程->服务中的几处翻译问题

The consumer of our service doesn't know how the service gets the data. Our HeroService could get Hero data from anywhere. It could get the data from a web service or local storage or from a mock data source.

消费者并不知道本服务会如何获取数据。 我们的 HeroService 服务可以从任何地方获取英雄的数据。 它可以从网络服务器获取,可以从浏览器的局部存储区获取,也可以是直接写在源码中的 mock 数据。

此处消费者建议改为数据使用者
1.

That's the beauty of removing data access from the component. We can change our minds about the implementation as often as we like, for whatever reason, without touching any of the components that need heroes.

我们从组件中成功移除了数据访问代码,干得漂亮。 这下子,我们可以随时改变数据访问的实现方式了。

这句话的翻译显然有误,不看原文会感觉一头雾水。建议改为:

这就是从组件中移除数据访问代码的美妙之处。这样我们可以随时改变数据访问的实现方式,而无需对使用英雄的组件作任何改动。

We're ready to use the HeroService in other components starting with our AppComponent.

我们已经在包括 AppComponent 在内的多个组件中使用了 HeroService 服务。

此处应为

我们可以在多个组件中使用HeroService服务了,先从AppComponent开始。

基础知识=》表单

在基础知识=》表单这篇译文中,很多地方的ngModel都被写成了ngControl

是不是这样翻译更恰当

QuickStart中的

Component 是一个 装饰器函数 ,它接受一个 元数据对象 作为参数。 通过给这个函数加上 @ 前缀,可以把这个函数加到组件类上,比如上面这个类。

Component is a decorator function that takes a metadata object as argument. We apply this function to the component class by prefixing the function with the @ symbol and invoking it with a metadata object, just above the class.

是不是翻译成 “Component 是一个 装饰器函数 ,它接受一个 元数据对象 作为参数。通过给这个函数加上 @ 前缀,并在组件类声明的上方调用它,可以把这个函数加到组件类上”

英文显示不全

https://angular.cn/docs/ts/latest/guide/router.html

为激活的 URL 显示应用组件。管理从一个组件到另一个组件的导航

这句话现在点开英文显示的是

.the application component for the active URL.navigation from one component to the next.

但实际应该是

Displays the application component for the active URL. Manages navigation from one component to the next.

源代码看着没问题,不太清楚什么造成的。

中文教程的代码框内容好像挂了

heroes教程《英雄指南》中的代码框内容,显示不出。
app/heroes.component.ts (showing renamings only)为例:
显示:
出错的文件: ../../../_fragments/toh-5/ts/app/heroes.component-heroes-component-renaming.ts.md 所在路径: docs,ts,latest,tutorial,toh-pt5 文档路径: ../../../

About license

The license of angularjs code and documentation is :

Powered by Google ©2010-2016. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.

BUT, you have changed the license to CC BY-NC 4.0 , it seems like you broke the original LICENSE.
Is this OK?


angularjs 的源码和文档分别遵循 MIT 和 CC BY 4.0 协议,而你们翻译的文档却将协议修改为 CC BY-NC 4.0,这样做合适吗?

angular2怎么做app

看了看文档目录好像没有提到怎么制作app,只提到怎么制作web。
特性 中所指的制作app 是指使用ionic2这款框架吗?

关于Angular2中文网中《开发指南》的《路由与导航》,这段提到一个dialog.server.ts没有具体内容

你好,
我是一个Angular2初学者,按照中文网站中《开发指南》的《路由与导航》,这段提到一个dialog.server.ts没有具体内容,只有这样的说明:“DialogService (为了在应用级使用,已经注入到了 AppComponent )就可以做到这些。
它返回 promise ,当用户最终决定了如何去做时,它就会被 解析 ——或者决定放弃更改直接导航离开( true ),或者保留未完成的修改,留在危机编辑器中( false )。”,不知道能否帮忙给一段代码?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.