Compare commits

...

83 Commits

Author SHA1 Message Date
5269ce287e feat(ivy): support deep queries through view boundaries (#21700)
PR Close #21700
2018-01-24 22:18:38 -08:00
3e03dbe576 refactor(ivy): flatten hooks and collapse LView hook properties (#21650)
PR Close #21650
2018-01-24 22:14:33 -08:00
33b338120c refactor(ivy): move onDestroys out of cleanup (#21650)
PR Close #21650
2018-01-24 22:14:33 -08:00
811679a583 refactor(ivy): remove unnecessary Comp.r function (#21650)
PR Close #21650
2018-01-24 22:14:33 -08:00
2c33d17609 refactor(ivy): move content and view hooks into TView (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
9c99e6a838 refactor(ivy): move init hooks into TView (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
98174758ad refactor(ivy): add type and hooks to directive def (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
97b928053d fix(ivy): correct onDestroy order for projected components (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
1fe55e252c feat(ivy): add afterContentInit and afterContentChecked to render3 (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
53ed4b4648 test(ivy): add missing lifecycle tests for projected components (#21650)
PR Close #21650
2018-01-24 22:14:32 -08:00
d08785d2e1 docs: add changelog for 6.0.0-beta.1 2018-01-24 22:01:19 -08:00
c24533eb51 release: cut the 6.0.0-beta.1 release 2018-01-24 21:58:09 -08:00
4b1aadee94 docs: add changelog for 5.2.2 2018-01-24 21:53:10 -08:00
e4b11b2de6 Revert "fix(aio): update redirects to fix unwanted 404s (#21712)"
This reverts commit f9a6a94be4.
2018-01-24 15:53:57 -08:00
92ddd46bcc Revert "docs(aio): update docs changelog with links to ts-to-js guide (#21712)"
This reverts commit 43d1b9864f.
2018-01-24 15:50:41 -08:00
bf5f50d9ee Revert "build(aio): add tests for Firebase redirection (#21712)"
This reverts commit 01cef016ee.
2018-01-24 15:50:00 -08:00
753622414a Revert "fix(aio): add missing forward slash to redirect (#21712)"
This reverts commit f11b2fb00b.
2018-01-24 15:49:42 -08:00
c6ecb638a0 Revert "fix(aio): add missing leading slash on firebase redirect (#21761)"
This reverts commit 12f801e3dc.
2018-01-24 15:49:27 -08:00
5f681f9745 fix(compiler): Don't strip /*# sourceURL ... */ (#16088)
Currently, `shimCssText` only keep `/*# sourceMappingUrl ... */` comments and strip `/*# sourceURL ... */` comments. So, Chrome can't find the source maps for component style(that's created in new `style` tags)

PR Close #16088
2018-01-24 12:35:30 -08:00
c7c5214029 build: merge PR to all branches per target: label (#21739)
PR Close #21739
2018-01-24 12:35:11 -08:00
12f801e3dc fix(aio): add missing leading slash on firebase redirect (#21761)
PR Close #21761
2018-01-24 12:34:33 -08:00
925e654a29 fix(router): don't use ParamsInheritanceStrategy in declarations (#21574)
ParamsInheritanceStrategy is internal, so any references to it from the
published .d.ts files will fail.

Fixes #21456.

PR Close #21574
2018-01-23 21:34:37 -08:00
d0e086a5fe fix(aio): remove remaining plnkr references (#20165)
PR Close #20165
2018-01-23 21:30:27 -08:00
15c2a93f14 build(aio): check for obsolete plnkr.json and missing main files (#20165)
Also, remove `plnkr.json` for `service-worker-getting-started` guide,
since it is not used and ServiceWorker cannot work correctly in
plnkr/stackblitz anyway (e.g. no build step to re-compute hashes).
A zipper might be useful and can be added in a subsequent PR, but it is
currently broken (e.g. no dependency on `@angular/service-worker`).

PR Close #20165
2018-01-23 21:30:27 -08:00
8522546a8a build(aio): upgrade sample package.json files to jasmine@~2.8.0 (#20165)
- Update tooling to support revised testing guide (PR #20697).
- Require jasmine upgrade for examples that use marble testing.
- Copy `cli/package.json` to `testing/` and add `jasmine-marbles`.
- Resolve merge conflicts created by `NgModules` guides.

PR Close #20165
2018-01-23 21:30:27 -08:00
1a75934cc0 build(aio): migrate plunker to stackblitz (#20165)
PR Close #20165
2018-01-23 21:30:27 -08:00
1e9cd95f5c test(ivy): content projection canonical example (#21674)
PR Close #21674
2018-01-23 16:42:07 -08:00
acf381bcb7 docs: update ICU select messages to use male/female (#21713)
fixes #21694

PR Close #21713
2018-01-23 16:32:23 -08:00
cb5090cdc8 fix(compiler): fix ICU select messages to use male/female/other (#21713)
related to #21694

PR Close #21713
2018-01-23 16:32:23 -08:00
4b70bcd200 test(forms): Better description and coverage for #19256 (#21652)
fixes #21575

PR Close #21652
2018-01-23 16:31:45 -08:00
8baff1858b fix(ivy): add names to function expressions (#21714)
PR Close #21714
2018-01-23 13:33:48 -08:00
f11b2fb00b fix(aio): add missing forward slash to redirect (#21712)
PR Close #21712
2018-01-23 13:33:36 -08:00
01cef016ee build(aio): add tests for Firebase redirection (#21712)
PR Close #21712
2018-01-23 13:33:36 -08:00
43d1b9864f docs(aio): update docs changelog with links to ts-to-js guide (#21712)
PR Close #21712
2018-01-23 13:33:36 -08:00
f9a6a94be4 fix(aio): update redirects to fix unwanted 404s (#21712)
Closes #21377

PR Close #21712
2018-01-23 13:33:36 -08:00
dd8679037e fix(compiler-cli): do not fold errors past calls in the collector (#21708)
Folding errors passed calls prevented the static reflector from
begin able to ignore errors in annotations it doesn't know as
the call to the unknown annotation was elided from the metadata.

Fixes: #21273

PR Close #21708
2018-01-23 13:33:25 -08:00
e82812b9a9 docs: fix #19989, add zone flags(blacklist/module) in guide (#21701)
PR Close #21701
2018-01-23 13:33:10 -08:00
c65634215b feat(ivy): update specification to include template variables (#21677)
PR Close #21677
2018-01-23 13:32:57 -08:00
0ad02de47e feat(ivy): support for the ngForOf directive, with tests (#21430)
Implement NgOnChangesFeature, ViewContainerRef, TemplateRef,
and the renderEmbeddedTemplate instruction, and wire together the
pieces required for the ngForOf directive to work.

PR Close #21430
2018-01-23 12:54:39 -08:00
6472661ae8 refactor(ivy): avoid circular dep with query/di/instructions (#21430)
To prepare for pending ngForOf work, the dep from instructions -> query
should be broken. This will enable a dep from di -> instructions while
avoiding a di -> instructions -> query -> di cycle.

Analyzing this cycle also uncovered another problem: the implementation
of query() breaks tree-shaking through a hard dependency on DI concepts
of TemplateRef, ElementRef, ViewContainerRef. This is fundamentally due
to how query() can query for those values without any configuration.

Instead, this fix introduces the concept by employing the strategy
pattern, and redefining QueryReadType to pass a function which will
return one of the above values. This strategy is then used for 'read'
instead of an enum in cases where special values should be read from
the DI system.

PR Close #21430
2018-01-23 12:54:39 -08:00
c5586b7dfa fix(ivy): assertLessThan asserts the wrong thing (#21430)
assertLessThan() actually does the opposite of what it advertises.
It's only through luck that existing asserts have not failed
before. This changes assertLessThan to actually assert that the
value is less than something.

PR Close #21430
2018-01-23 12:54:39 -08:00
95fbb7d675 build: Update to latest rules_typescript. (#21675)
Fixes #21481

PR Close #21675
2018-01-22 15:32:59 -08:00
a64af40c0b build(aio): generate sitemap from the generated pages (#21689)
Closes #21684

PR Close #21689
2018-01-22 12:55:15 -08:00
2015ccd1f5 docs(aio): added a link to Angular-RU (#21687)
Angular-RU Community on GitHub is a single point for all resources, chats, podcasts and meetups for Angular in Russia

PR Close #21687
2018-01-22 12:55:03 -08:00
7d49443060 fix(common): A null value should remove the style on IE (#21679)
fixes #21064

PR Close #21679
2018-01-22 12:54:49 -08:00
86d9612230 feat(ivy): update compiler to specification (#21657)
PR Close #21657
2018-01-20 09:28:44 -08:00
8c51c276c7 docs: fix stray div and reformat paragraph (#21676)
PR Close #21676
2018-01-19 20:40:13 -08:00
6c51665c82 ci: add github bot config to triage issues (#21672)
Fixes #21635
PR Close #21672
2018-01-19 20:39:58 -08:00
d39d1ce412 ci(aio): do not limit size of gzip7 and gzip 9 (#21601)
PR Close #21601
2018-01-19 20:39:42 -08:00
88045a5050 feat(aio): update metatags to control search engine crawling (#21665)
The `<meta name="robots" content="noindex">` tag is used
to indicate to search engine crawlers that they should not index
the current page. This is set dynamically by the the document
viewer component to ensure that 404 and other erroring pages
are not added to the search index.

This relies upon the idea that the crawling bot will run the JS
and wait to see if this meta tag has been added or not.

Since we believe that the `googebot` will do this, we also
pre-emptively add a hard-coded noindex tag specifically for
this bot, so that if anything else fails in bootstrapping the app,
the failed page will not be added to the index.

Closes #21317

PR Close #21665
2018-01-19 20:30:02 -08:00
0b38a039d0 perf(ivy): add a proper creationOnly scenario to the tree benchmark (#21503)
PR Close #21503
2018-01-19 15:24:06 -08:00
a0dc0a2f46 test(ivy): add render3 integration tests (#21557)
PR Close #21557
2018-01-19 15:23:52 -08:00
6397062e22 perf(ivy): set ngDevMode to false in render3 benchmarks (#21502)
PR Close #21502
2018-01-19 15:23:33 -08:00
e18f1de003 refactor(ivy): remove unnecessary D instruction (#21484)
PR Close #21484
2018-01-19 15:23:17 -08:00
21e37e47c6 fix(ivy): update the compiler specification (#21656)
Also make a minor fix for directive definitions

PR Close #21656
2018-01-19 13:23:54 -08:00
8e8924ac7c ci: use sudo: false on Travis (#21641)
Related to #21422.

PR Close #21641
2018-01-19 13:23:47 -08:00
b2e902deb4 fix(aio): fix code highlight in API docs templates (#21630)
Fixes #21108

PR Close #21630
2018-01-19 13:23:41 -08:00
97b18b2a5c fix(common): extract plural function from i18n locale data files for TS 2.6 (#21626)
Fixes #21608

PR Close #21626
2018-01-19 13:23:34 -08:00
135a2822ea fix(common): don't remove special characters when extracting CLDR data (#21626)
PR Close #21626
2018-01-19 13:23:34 -08:00
1104d17252 refactor(bazel): pass around tsconfig as a file, not a path (#21614)
this unlocks the ability to replay ts compilations with different settings

PR Close #21614
2018-01-19 11:53:59 -08:00
a1492a73ce build: Remove angular_src nested workspace (#21096)
PR Close #21096
2018-01-19 10:17:37 -08:00
c8a1a14b87 docs: clarify the use of classes and interfaces in style guide (#20919)
PR Close #20919
2018-01-18 18:22:55 -06:00
64d16dee02 feat(compiler): implement "enableIvy" compiler option (#21427)
The "enableIvy" compiler option is the initial implementation
of the Render3 (or Ivy) code generation. This commit enables
generation generating "Hello, World" (example in the test)
but not much else. It is currenly only useful for internal Ivy
testing as Ivy is in development.

PR Close #21427
2018-01-18 18:22:44 -06:00
ce8b5877e2 ci: add "PR action: cleanup" to the bot's forbiddenLabels list (#21562)
PR Close #21562
2018-01-18 18:22:32 -06:00
44a4b1680f docs: improve/simplify example for providers guide (#21589)
PR Close #21589
2018-01-18 18:22:20 -06:00
4596b9d0df docs: fix/improve example for singleton-services guide (#21589)
PR Close #21589
2018-01-18 18:22:20 -06:00
81e87095b4 docs: several minor NgModule guide fixes/improvements (#21589)
PR Close #21589
2018-01-18 18:22:20 -06:00
bf248792eb docs: minor fixes (anchor tags, redundant whitespace, consistent code-snippets lang) (#21589)
PR Close #21589
2018-01-18 18:22:20 -06:00
1ce46b56f8 docs: change titles to sentence case (#21620)
PR Close #21620
2018-01-18 18:22:09 -06:00
d07760f5e3 build(aio): fix zips testing commands (#21629)
PR Close #21629
2018-01-18 18:21:59 -06:00
2b4f3004ac ci: update github bot messages (#21634)
Fixes #21633
PR Close #21634
2018-01-18 18:21:52 -06:00
7f93aad836 fix(compiler-cli): do not lower expressions in non-modules (#21649)
Fixes: #21651

PR Close #21649
2018-01-18 18:21:42 -06:00
879756d44c fix(common): fallback to last defined value for named date and time formats (#21299)
closes #21282

PR Close #21299
2018-01-18 13:39:00 -06:00
2cf9d6d75b fix(aio): add a required comma in firebase.json 2018-01-17 19:32:29 -08:00
af2a843446 docs: edit entry component FAQ (#21487)
PR Close #21487
2018-01-17 17:14:33 -08:00
02377335ec docs: add server side redirect and fix NgModule FAQ links (#21487)
PR Close #21487
2018-01-17 17:14:33 -08:00
e79e98ab44 docs: fix lazy loading example dir name (#21475)
PR Close #21475
2018-01-17 17:02:41 -08:00
52cfe3952a build: add mhevery to bazel approvers (#21314)
PR Close #21314
2018-01-17 17:02:22 -08:00
f74130c9f7 fix(compiler): add support for marker tags in xliff serializers (#21250)
The Xliff serializer now supports the tags `seg-source` and `mrk`, while the Xliff2 serializer now supports `mrk`.
Fixes #21078
PR Close #21250
2018-01-17 17:02:09 -08:00
d3d9aac4e9 feat(core): optional generic type for ElementRef (#20765)
Add optional, backwards compatible generic type to `ElementRef` to
support typed `nativeElement`

Fix #13139

PR Close #20765
2018-01-17 17:01:49 -08:00
1ccc3242f1 docs(ivy): add feature principle doc (#21565)
PR Close #21565
2018-01-17 17:01:09 -08:00
47b7898697 Revert "fix(core): fix chained http call (#20924)"
This reverts commit 7e3f9a482a.
2018-01-17 15:28:21 -08:00
0eabd07f3a fix: avoid triggering a cli bug (#21611)
Temporary update to the package.json file until CLI is fixed to
handle 6.0 builds.
2018-01-17 15:22:06 -08:00
988 changed files with 15202 additions and 8161 deletions

View File

@ -62,7 +62,7 @@ jobs:
# Use bazel query so that we explicitly ask for all buildable targets to be built as well
# This avoids waiting for a build command to finish before running the first test
# See https://github.com/bazelbuild/bazel/issues/4257
- run: bazel query --output=label '//modules/... union //packages/... union //tools/... union @angular//...' | xargs bazel test --config=ci
- run: bazel query --output=label '//modules/... union //packages/... union //tools/...' | xargs bazel test --config=ci
- save_cache:
key: *cache_key

View File

@ -14,8 +14,8 @@ merge:
failureText: "The following checks are failing:"
# comment that will be added to a PR when there is a conflict, leave empty or set to false to disable
mergeConflictComment: "Hello? Don't want to hassle you. Sure you're busy. But this PR has some merge conflicts that you probably ought to resolve.
\nThat is... if you want it to be merged someday..."
mergeConflictComment: "Hi @{{PRAuthor}}! This PR has merge conflicts due to recent upstream merges.
\nPlease help to unblock it by resolving these conflicts. Thanks!"
# label to monitor
mergeLabel: "PR action: merge"
@ -32,6 +32,7 @@ merge:
# list of labels that a PR shouldn't have, checked after the required labels with a regexp
forbiddenLabels:
- "PR target: TBD"
- "PR action: cleanup"
- "cla: no"
# list of PR statuses that need to be successful
@ -44,9 +45,24 @@ merge:
# the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable
# {{MERGE_LABEL}} will be replaced by the value of the mergeLabel option
# {{PLACEHOLDER}} will be replaced by the list of failing checks
mergeRemovedComment: "I see that you just added the `{{MERGE_LABEL}}` label. It won't do anything good though, because the following checks are still failing:
\n{{PLACEHOLDER}}
\n
\n**If you want your PR to be merged, it has to pass all the CI checks.**
\n
\nIf you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help."
mergeRemovedComment: "I see that you just added the `{{MERGE_LABEL}}` label, but the following checks are still failing:
\n{{PLACEHOLDER}}
\n
\n**If you want your PR to be merged, it has to pass all the CI checks.**
\n
\nIf you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help."
# options for the triage plugin
triage:
# number of the milestone to apply when the issue is triaged
defaultMilestone: 82,
# arrays of labels that determine if an issue is triaged
triagedLabels:
-
- "type: bug"
- "severity"
- "freq"
- "comp:"
-
- "type: feature"
- "comp:"

View File

@ -92,6 +92,7 @@ groups:
- alexeagle #primary
- chuckjaz
- IgorMinar #fallback
- mhevery
- vikerman #fallback
build-and-ci:

View File

@ -1,7 +1,5 @@
language: node_js
# Work-around for https://github.com/travis-ci/travis-ci/issues/8836#issuecomment-356362524.
# (Restore `sudo: false` once that is resolved.)
sudo: required
sudo: false
dist: trusty
node_js:
- '8.9.1'

View File

@ -1,3 +1,48 @@
<a name="6.0.0-beta.1"></a>
# [6.0.0-beta.1](https://github.com/angular/angular/compare/6.0.0-beta.0...6.0.0-beta.1) (2018-01-25)
### Bug Fixes
* **common:** A null value should remove the style on IE ([#21679](https://github.com/angular/angular/issues/21679)) ([7d49443](https://github.com/angular/angular/commit/7d49443)), closes [#21064](https://github.com/angular/angular/issues/21064)
* avoid triggering a cli bug ([#21611](https://github.com/angular/angular/issues/21611)) ([0eabd07](https://github.com/angular/angular/commit/0eabd07))
* **common:** don't remove special characters when extracting CLDR data ([#21626](https://github.com/angular/angular/issues/21626)) ([135a282](https://github.com/angular/angular/commit/135a282))
* **common:** extract plural function from i18n locale data files for TS 2.6 ([#21626](https://github.com/angular/angular/issues/21626)) ([97b18b2](https://github.com/angular/angular/commit/97b18b2)), closes [#21608](https://github.com/angular/angular/issues/21608)
* **common:** fallback to last defined value for named date and time formats ([#21299](https://github.com/angular/angular/issues/21299)) ([879756d](https://github.com/angular/angular/commit/879756d)), closes [#21282](https://github.com/angular/angular/issues/21282)
* **compiler:** add support for marker tags in xliff serializers ([#21250](https://github.com/angular/angular/issues/21250)) ([f74130c](https://github.com/angular/angular/commit/f74130c)), closes [#21078](https://github.com/angular/angular/issues/21078)
* **compiler:** Don't strip `/*# sourceURL ... */` ([#16088](https://github.com/angular/angular/issues/16088)) ([5f681f9](https://github.com/angular/angular/commit/5f681f9))
* **compiler:** fix ICU select messages to use male/female/other ([#21713](https://github.com/angular/angular/issues/21713)) ([cb5090c](https://github.com/angular/angular/commit/cb5090c))
* **compiler-cli:** do not fold errors past calls in the collector ([#21708](https://github.com/angular/angular/issues/21708)) ([dd86790](https://github.com/angular/angular/commit/dd86790))
* **compiler-cli:** do not lower expressions in non-modules ([#21649](https://github.com/angular/angular/issues/21649)) ([7f93aad](https://github.com/angular/angular/commit/7f93aad))
* **router:** don't use ParamsInheritanceStrategy in declarations ([#21574](https://github.com/angular/angular/issues/21574)) ([925e654](https://github.com/angular/angular/commit/925e654)), closes [#21456](https://github.com/angular/angular/issues/21456)
### Features
* **compiler:** implement "enableIvy" compiler option ([#21427](https://github.com/angular/angular/issues/21427)) ([64d16de](https://github.com/angular/angular/commit/64d16de))
* **core:** optional generic type for ElementRef ([#20765](https://github.com/angular/angular/issues/20765)) ([d3d9aac](https://github.com/angular/angular/commit/d3d9aac)), closes [#13139](https://github.com/angular/angular/issues/13139)
<a name="5.2.2"></a>
## [5.2.2](https://github.com/angular/angular/compare/5.2.1...5.2.2) (2018-01-25)
### Bug Fixes
* **common:** A null value should remove the style on IE ([#21679](https://github.com/angular/angular/issues/21679)) ([c12ea3a](https://github.com/angular/angular/commit/c12ea3a)), closes [#21064](https://github.com/angular/angular/issues/21064)
* **common:** don't remove special characters when extracting CLDR data ([#21626](https://github.com/angular/angular/issues/21626)) ([a62c186](https://github.com/angular/angular/commit/a62c186))
* **common:** extract plural function from i18n locale data files for TS 2.6 ([#21626](https://github.com/angular/angular/issues/21626)) ([71f9eaa](https://github.com/angular/angular/commit/71f9eaa)), closes [#21608](https://github.com/angular/angular/issues/21608)
* **common:** fallback to last defined value for named date and time formats ([#21299](https://github.com/angular/angular/issues/21299)) ([982eb7b](https://github.com/angular/angular/commit/982eb7b)), closes [#21282](https://github.com/angular/angular/issues/21282)
* **compiler:** add support for marker tags in xliff serializers ([#21250](https://github.com/angular/angular/issues/21250)) ([02352bc](https://github.com/angular/angular/commit/02352bc)), closes [#21078](https://github.com/angular/angular/issues/21078)
* **compiler:** Don't strip `/*# sourceURL ... */` ([#16088](https://github.com/angular/angular/issues/16088)) ([de6c644](https://github.com/angular/angular/commit/de6c644))
* **compiler:** fix ICU select messages to use male/female/other ([#21713](https://github.com/angular/angular/issues/21713)) ([8e44577](https://github.com/angular/angular/commit/8e44577))
* **compiler-cli:** do not fold errors past calls in the collector ([#21708](https://github.com/angular/angular/issues/21708)) ([52970c0](https://github.com/angular/angular/commit/52970c0))
* **compiler-cli:** do not lower expressions in non-modules ([#21649](https://github.com/angular/angular/issues/21649)) ([ba4ea82](https://github.com/angular/angular/commit/ba4ea82))
* **router:** don't use ParamsInheritanceStrategy in declarations ([#21574](https://github.com/angular/angular/issues/21574)) ([8b3fbb5](https://github.com/angular/angular/commit/8b3fbb5)), closes [#21456](https://github.com/angular/angular/issues/21456)
<a name="6.0.0-beta.0"></a>
# [6.0.0-beta.0](https://github.com/angular/angular/compare/5.2.0...6.0.0-beta.0) (2018-01-17)

View File

@ -1,4 +1,4 @@
workspace(name = "angular_src")
workspace(name = "angular")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
@ -16,19 +16,13 @@ node_repositories(package_json = ["//:package.json"])
git_repository(
name = "build_bazel_rules_typescript",
remote = "https://github.com/bazelbuild/rules_typescript.git",
# tag = "0.7.1+",
commit = "89d2c75066bea3d9c942f29dd1d2ea543c58d6d5"
commit = "c4ea003acd7d42269b81a2d25eb832972cd24912"
)
load("@build_bazel_rules_typescript//:setup.bzl", "ts_setup_workspace")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()
local_repository(
name = "angular",
path = "packages/bazel",
)
local_repository(
name = "rxjs",
path = "node_modules/rxjs/src",

View File

@ -4,7 +4,7 @@ Everything in this folder is part of the documentation project. This includes
* the web site for displaying the documentation
* the dgeni configuration for converting source files to rendered files that can be viewed in the web site.
* the tooling for setting up examples for development; and generating plunkers and zip files from the examples.
* the tooling for setting up examples for development; and generating live-example and zip files from the examples.
## Developer tasks
@ -13,7 +13,7 @@ You should run all these tasks from the `angular/aio` folder.
Here are the most important tasks you might need to use:
* `yarn` - install all the dependencies.
* `yarn setup` - install all the dependencies, boilerplate, plunkers, zips and run dgeni on the docs.
* `yarn setup` - install all the dependencies, boilerplate, stackblitz, zips and run dgeni on the docs.
* `yarn setup-local` - same as `setup`, but use the locally built Angular packages for aio and docs examples boilerplate.
* `yarn build` - create a production build of the application (after installing dependencies, boilerplate, etc).
@ -32,7 +32,7 @@ Here are the most important tasks you might need to use:
* `yarn boilerplate:add` - generate all the boilerplate code for the examples, so that they can be run locally. Add the option `--local` to use your local version of Angular contained in the "dist" folder.
* `yarn boilerplate:remove` - remove all the boilerplate code that was added via `yarn boilerplate:add`.
* `yarn generate-plunkers` - generate the plunker files that are used by the `live-example` tags in the docs.
* `yarn generate-stackblitz` - generate the stackblitz files that are used by the `live-example` tags in the docs.
* `yarn generate-zips` - generate the zip files from the examples. Zip available via the `live-example` tags in the docs.
* `yarn example-e2e` - run all e2e tests for examples

View File

@ -76,8 +76,8 @@ aot-compiler/**/*.factory.d.ts
# universal
!universal/webpack.server.config.js
# plunkers
*plnkr.no-link.html
# stackblitz
*stackblitz.no-link.html
# ngUpgrade testing
!upgrade-phonecat-*/**/karma.conf.js

View File

@ -1,6 +1,5 @@
{
"description": "AngularJS to Angular Quick Reference",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js",

View File

@ -1,6 +1,5 @@
{
"description": "Angular Animations",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js"

View File

@ -1,9 +1,9 @@
{
"description": "Intro to Angular",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js",
"!app/hero-list.component.1.*"
]
"!**/*.[1].*"
],
"file": "src/app/app.module.ts"
}

View File

@ -1,4 +1,4 @@
// Not used. Keep away from plunker
// Not used. Keep away from stackblitz
// Keeps ATLS from complaining about undeclared directives.
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

View File

@ -1,10 +1,9 @@
{
"description": "Attribute Directive",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js",
"!app/*.[0,1,2,3].*"
"!**/*.[1,2,3].*"
],
"tags": ["attribute", "directive"]
}

View File

@ -1,11 +1,10 @@
{
"description": "Bootstrapping",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js",
"!**/*.[1,2].*"
],
"open": "app/app.component.ts",
"file": "src/app/app.component.ts",
"tags": ["ngmodules"]
}

View File

@ -1,6 +1,5 @@
{
"description": "Component Communication Cookbook samples",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js"

View File

@ -1,6 +1,5 @@
{
"description": "Component Styles",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js",

View File

@ -1,6 +1,5 @@
{
"description": "Dependency Injection",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js",

View File

@ -1,6 +1,5 @@
{
"description": "Dependency Injection",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js",

View File

@ -1,6 +1,5 @@
{
"description": "Displaying Data",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js",

View File

@ -1,9 +0,0 @@
{
"description": "Second authors style guide plunker (non-executing)",
"basePath": "src/",
"files": [
"index.2.html"
],
"main": "index.2.html",
"tags": ["author", "style guide"]
}

View File

@ -0,0 +1,8 @@
{
"description": "Second authors style guide stackblitz (non-executing)",
"files": [
"src/index.2.html"
],
"main": "src/index.2.html",
"tags": ["author", "style guide"]
}

View File

@ -1,6 +1,5 @@
{
"description": "Authors style guide",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js",

View File

@ -1,6 +1,5 @@
{
"description": "Dynamic Component Loader",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js"

View File

@ -1,6 +1,5 @@
{
"description": "Dynamic Form",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js",

View File

@ -1,11 +1,10 @@
{
"description": "Feature Modules",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js",
"!**/*.[1,2].*"
],
"open": "app/app.component.ts",
"file": "src/app/app.component.ts",
"tags": ["feature modules"]
}

View File

@ -1,6 +1,5 @@
{
"description": "Validation",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js"

View File

@ -1,6 +1,5 @@
{
"description": "Forms",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js"

View File

@ -1,6 +1,5 @@
{
"description": "Hierarchical Dependency Injection",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js"

View File

@ -1,6 +1,5 @@
{
"description": "Http",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js",

View File

@ -41,29 +41,30 @@
<!-- #enddocregion translated-plural -->
<!-- #docregion translated-select -->
<!-- #docregion translate-select-1 -->
<trans-unit id="52515023fc70c216ef291086c1962ff135a9fe13" datatype="html">
<source>The author is <x id="ICU" equiv-text="{gender, select, m {...} f {...} o {...}}"/></source>
<target>L'auteur est <x id="ICU" equiv-text="{gender, select, m {...} f {...} o {...}}"/></target>
</trans-unit>
<trans-unit id="f99f34ac9bd4606345071bd813858dec29f3b7d1" datatype="html">
<source>The author is <x id="ICU" equiv-text="{gender, select, male {...} female {...} other {...}}"/></source>
<target>L'auteur est <x id="ICU" equiv-text="{gender, select, male {...} female {...} other {...}}"/></target>
</trans-unit>
<!-- #enddocregion translate-select-1 -->
<!-- #docregion translate-select-2 -->
<trans-unit id="4e6fd3f2bb3477e8ad2088f03257f6e1b8b515a5" datatype="html">
<source>{VAR_SELECT, select, m {male} f {female} o {other} }</source>
<target>{VAR_SELECT, select, m {un homme} f {une femme} o {autre} }</target>
<trans-unit id="eff74b75ab7364b6fa888f1cbfae901aaaf02295" datatype="html">
<source>{VAR_SELECT, select, male {male} female {female} other {other} }</source>
<target>{VAR_SELECT, select, male {un homme} female {une femme} other {autre} }</target>
</trans-unit>
<!-- #enddocregion translate-select-2 -->
<!-- #enddocregion translated-select -->
<!-- #docregion translate-nested -->
<!-- #docregion translate-nested-1 -->
<trans-unit id="f7a55c9ef7c5b37147825a9041263305063e63e9" datatype="html">
<trans-unit id="972cb0cf3e442f7b1c00d7dab168ac08d6bdf20c" datatype="html">
<source>Updated: <x id="ICU" equiv-text="{minutes, plural, =0 {...} =1 {...} other {...}}"/></source>
<target>Mis à jour: <x id="ICU" equiv-text="{minutes, plural, =0 {...} =1 {...} other {...}}"/></target>
</trans-unit>
<!-- #enddocregion translate-nested-1 -->
<!-- #docregion translate-nested-2 -->
<trans-unit id="80b5ac44661751e191225c0b1e000bceeeccb52c" datatype="html">
<source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago by {VAR_SELECT, select, m {male} f {female} o {other} }} }</source>
<target>{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a <x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes par {VAR_SELECT, select, m {un homme} f {une femme} o {autre} }} }</target>
<trans-unit id="7151c2e67748b726f0864fc443861d45df21d706" datatype="html">
<source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago by {VAR_SELECT, select, male {male} female {female} other {other} }} }</source>
<target>{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a <x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes par {VAR_SELECT, select, male {un homme} female {une femme} other {autre} }} }</target>
</trans-unit>
<!-- #enddocregion translate-nested-2 -->
<!-- #enddocregion translate-nested -->

View File

@ -23,13 +23,13 @@
<br><br>
<button (click)="male()">&#9794;</button> <button (click)="female()">&#9792;</button> <button (click)="other()">&#9895;</button>
<!--#docregion i18n-select-->
<span i18n>The author is {gender, select, m {male} f {female} o {other}}</span>
<span i18n>The author is {gender, select, male {male} female {female} other {other}}</span>
<!--#enddocregion i18n-select-->
<br><br>
<!--#docregion i18n-nested-->
<span i18n>Updated: {minutes, plural,
=0 {just now}
=1 {one minute ago}
other {{{minutes}} minutes ago by {gender, select, m {male} f {female} o {other}}}}
other {{{minutes}} minutes ago by {gender, select, male {male} female {female} other {other}}}}
</span>
<!--#enddocregion i18n-nested-->

View File

@ -7,15 +7,15 @@ import { Component } from '@angular/core';
})
export class AppComponent {
minutes = 0;
gender = 'f';
gender = 'female';
fly = true;
logo = 'https://angular.io/assets/images/logos/angular/angular.png';
heroes: string[] = ['Magneta', 'Celeritas', 'Dynama'];
inc(i: number) {
this.minutes = Math.min(5, Math.max(0, this.minutes + i));
}
male() { this.gender = 'm'; }
female() { this.gender = 'f'; }
other() { this.gender = 'o'; }
male() { this.gender = 'male'; }
female() { this.gender = 'female'; }
other() { this.gender = 'other'; }
}

View File

@ -48,23 +48,23 @@
<context context-type="linenumber">21</context>
</context-group>
</trans-unit>
<trans-unit id="52515023fc70c216ef291086c1962ff135a9fe13" datatype="html">
<source>The author is <x id="ICU" equiv-text="{gender, select, m {...} f {...} o {...}}"/></source>
<target>L'auteur est <x id="ICU" equiv-text="{gender, select, m {...} f {...} o {...}}"/></target>
<trans-unit id="f99f34ac9bd4606345071bd813858dec29f3b7d1" datatype="html">
<source>The author is <x id="ICU" equiv-text="{gender, select, male {...} female {...} other {...}}"/></source>
<target>L'auteur est <x id="ICU" equiv-text="{gender, select, male {...} female {...} other {...}}"/></target>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">27</context>
</context-group>
</trans-unit>
<trans-unit id="4e6fd3f2bb3477e8ad2088f03257f6e1b8b515a5" datatype="html">
<source>{VAR_SELECT, select, m {male} f {female} o {other} }</source>
<target>{VAR_SELECT, select, m {un homme} f {une femme} o {autre} }</target>
<trans-unit id="eff74b75ab7364b6fa888f1cbfae901aaaf02295" datatype="html">
<source>{VAR_SELECT, select, male {male} female {female} other {other} }</source>
<target>{VAR_SELECT, select, male {un homme} female {une femme} other {autre} }</target>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">27</context>
</context-group>
</trans-unit>
<trans-unit id="f7a55c9ef7c5b37147825a9041263305063e63e9" datatype="html">
<trans-unit id="972cb0cf3e442f7b1c00d7dab168ac08d6bdf20c" datatype="html">
<source>Updated: <x id="ICU" equiv-text="{minutes, plural, =0 {...} =1 {...} other {...}}"/>
</source>
<target>Mis à jour: <x id="ICU" equiv-text="{minutes, plural, =0 {...} =1 {...} other {...}}"/>
@ -74,9 +74,9 @@
<context context-type="linenumber">31</context>
</context-group>
</trans-unit>
<trans-unit id="80b5ac44661751e191225c0b1e000bceeeccb52c" datatype="html">
<source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago by {VAR_SELECT, select, m {male} f {female} o {other} }} }</source>
<target>{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a <x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes par {VAR_SELECT, select, m {un homme} f {une femme} o {autre} }} }</target>
<trans-unit id="7151c2e67748b726f0864fc443861d45df21d706" datatype="html">
<source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago by {VAR_SELECT, select, male {male} female {female} other {other} }} }</source>
<target>{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a <x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes par {VAR_SELECT, select, male {un homme} female {une femme} other {autre} }} }</target>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">31</context>

View File

@ -7,8 +7,8 @@
Hello i18n!
</source>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">4</context>
<context context-type="sourcefile">app/app.component.ts</context>
<context context-type="linenumber">3</context>
</context-group>
<note priority="1" from="description">An introduction header for this sample</note>
<note priority="1" from="meaning">User welcome</note>
@ -16,58 +16,58 @@
<trans-unit id="ba0cc104d3d69bf669f97b8d96a4c5d8d9559aa3" datatype="html">
<source>I don&apos;t output any element</source>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">10</context>
<context context-type="sourcefile">app/app.component.ts</context>
<context context-type="linenumber">9</context>
</context-group>
</trans-unit>
<trans-unit id="701174153757adf13e7c24a248c8a873ac9f5193" datatype="html">
<source>Angular logo</source>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">16</context>
<context context-type="sourcefile">app/app.component.ts</context>
<context context-type="linenumber">15</context>
</context-group>
</trans-unit>
<trans-unit id="d69f6b42305f49332026fef24b40227f02e34594" datatype="html">
<source>Updated <x id="ICU" equiv-text="{minutes, plural, =0 {...} =1 {...} other {...}}"/></source>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">21</context>
<context context-type="sourcefile">app/app.component.ts</context>
<context context-type="linenumber">20</context>
</context-group>
</trans-unit>
<trans-unit id="5a134dee893586d02bffc9611056b9cadf9abfad" datatype="html">
<source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago} }</source>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">21</context>
<context context-type="sourcefile">app/app.component.ts</context>
<context context-type="linenumber">20</context>
</context-group>
</trans-unit>
<trans-unit id="52515023fc70c216ef291086c1962ff135a9fe13" datatype="html">
<source>The author is <x id="ICU" equiv-text="{gender, select, m {...} f {...} o {...}}"/></source>
<trans-unit id="f99f34ac9bd4606345071bd813858dec29f3b7d1" datatype="html">
<source>The author is <x id="ICU" equiv-text="{gender, select, male {...} female {...} other {...}}"/></source>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">27</context>
<context context-type="sourcefile">app/app.component.ts</context>
<context context-type="linenumber">26</context>
</context-group>
</trans-unit>
<trans-unit id="4e6fd3f2bb3477e8ad2088f03257f6e1b8b515a5" datatype="html">
<source>{VAR_SELECT, select, m {male} f {female} o {other} }</source>
<trans-unit id="eff74b75ab7364b6fa888f1cbfae901aaaf02295" datatype="html">
<source>{VAR_SELECT, select, male {male} female {female} other {other} }</source>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">27</context>
<context context-type="sourcefile">app/app.component.ts</context>
<context context-type="linenumber">26</context>
</context-group>
</trans-unit>
<trans-unit id="f7a55c9ef7c5b37147825a9041263305063e63e9" datatype="html">
<trans-unit id="972cb0cf3e442f7b1c00d7dab168ac08d6bdf20c" datatype="html">
<source>Updated: <x id="ICU" equiv-text="{minutes, plural, =0 {...} =1 {...} other {...}}"/>
</source>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">31</context>
<context context-type="sourcefile">app/app.component.ts</context>
<context context-type="linenumber">30</context>
</context-group>
</trans-unit>
<trans-unit id="80b5ac44661751e191225c0b1e000bceeeccb52c" datatype="html">
<source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago by {VAR_SELECT, select, m {male} f {female} o {other} }} }</source>
<trans-unit id="7151c2e67748b726f0864fc443861d45df21d706" datatype="html">
<source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago by {VAR_SELECT, select, male {male} female {female} other {other} }} }</source>
<context-group purpose="location">
<context context-type="sourcefile">app\app.component.ts</context>
<context context-type="linenumber">31</context>
<context context-type="sourcefile">app/app.component.ts</context>
<context context-type="linenumber">30</context>
</context-group>
</trans-unit>
</body>

View File

@ -15,8 +15,7 @@ const routes: Routes = [
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
providers: []
exports: [RouterModule]
})
export class CustomersRoutingModule { }
// #enddocregion customers-routing-module

View File

@ -6,23 +6,17 @@ import { Routes, RouterModule } from '@angular/router';
// #docregion orders-routing-module-detail
import { OrderListComponent } from './order-list/order-list.component';
const routes: Routes = [
{
path: '',
component: OrderListComponent
}
];
// #enddocregion orders-routing-module-detail
@NgModule({
imports: [
RouterModule.forChild(routes)
],
exports: [
RouterModule
]
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class OrdersRoutingModule { }
// #enddocregion orders-routing-module

View File

@ -1,11 +1,10 @@
{
"description": "Lazy Loading Feature Modules",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js",
"!**/*.[1,2].*"
],
"open": "app/app.component.ts",
"file": "src/app/app.component.ts",
"tags": ["lazy loading"]
}

View File

@ -1,6 +1,5 @@
{
"description": "Lifecycle Hooks",
"basePath": "src/",
"files":["!**/*.d.ts", "!**/*.js"],
"tags": ["lifecycle", "hooks",
"OnInit", "OnDestroy", "OnChange", "DoCheck",

View File

@ -1,6 +1,5 @@
{
"description": "<ng-container>",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js"

View File

@ -1,25 +0,0 @@
{
"description": "Contact NgModule v.1",
"basePath": "src/",
"files": [
"app/app.component.1b.ts",
"app/app.module.1b.ts",
"app/highlight.directive.ts",
"app/title.component.html",
"app/title.component.ts",
"app/user.service.ts",
"app/contact/awesome.pipe.ts",
"app/contact/contact.component.css",
"app/contact/contact.component.html",
"app/contact/contact.component.3.ts",
"app/contact/contact.service.ts",
"app/contact/contact-highlight.directive.ts",
"main.1b.ts",
"styles.css",
"index.1b.html"
],
"main": "index.1b.html",
"tags": ["NgModule"]
}

View File

@ -0,0 +1,24 @@
{
"description": "Contact NgModule v.1",
"files": [
"src/app/app.component.1b.ts",
"src/app/app.module.1b.ts",
"src/app/highlight.directive.ts",
"src/app/title.component.html",
"src/app/title.component.ts",
"src/app/user.service.ts",
"src/app/contact/awesome.pipe.ts",
"src/app/contact/contact.component.css",
"src/app/contact/contact.component.html",
"src/app/contact/contact.component.3.ts",
"src/app/contact/contact.service.ts",
"src/app/contact/contact-highlight.directive.ts",
"src/main.1b.ts",
"src/styles.css",
"src/index.1b.html"
],
"main": "src/index.1b.html",
"tags": ["NgModule"]
}

View File

@ -1,27 +0,0 @@
{
"description": "Contact NgModule v.2",
"basePath": "src/",
"files": [
"app/app.component.2.ts",
"app/app.module.2.ts",
"app/highlight.directive.ts",
"app/title.component.html",
"app/title.component.ts",
"app/user.service.ts",
"app/contact/contact.component.css",
"app/contact/contact.component.html",
"app/contact/contact.service.ts",
"app/contact/awesome.pipe.ts",
"app/contact/contact.component.3.ts",
"app/contact/contact.module.2.ts",
"app/contact/contact-highlight.directive.ts",
"main.2.ts",
"styles.css",
"index.2.html"
],
"main": "index.2.html",
"tags": ["NgModule"]
}

View File

@ -0,0 +1,26 @@
{
"description": "Contact NgModule v.2",
"files": [
"src/app/app.component.2.ts",
"src/app/app.module.2.ts",
"src/app/highlight.directive.ts",
"src/app/title.component.html",
"src/app/title.component.ts",
"src/app/user.service.ts",
"src/app/contact/contact.component.css",
"src/app/contact/contact.component.html",
"src/app/contact/contact.service.ts",
"src/app/contact/awesome.pipe.ts",
"src/app/contact/contact.component.3.ts",
"src/app/contact/contact.module.2.ts",
"src/app/contact/contact-highlight.directive.ts",
"src/main.2.ts",
"src/styles.css",
"src/index.2.html"
],
"main": "src/index.2.html",
"tags": ["NgModule"]
}

View File

@ -1,13 +0,0 @@
{
"description": "Minimal NgModule",
"basePath": "src/",
"files": [
"app/app.component.0.ts",
"app/app.module.0.ts",
"main.0.ts",
"styles.css",
"index.0.html"
],
"main": "index.0.html",
"tags": ["NgModule"]
}

View File

@ -0,0 +1,12 @@
{
"description": "Minimal NgModule",
"files": [
"src/app/app.component.0.ts",
"src/app/app.module.0.ts",
"src/main.0.ts",
"src/styles.css",
"src/index.0.html"
],
"main": "src/index.0.html",
"tags": ["NgModule"]
}

View File

@ -1,41 +0,0 @@
{
"description": "NgModule Final",
"basePath": "src/",
"files": [
"app/app.component.ts",
"app/app.module.ts",
"app/app-routing.module.ts",
"app/contact/contact.component.css",
"app/contact/contact.component.html",
"app/contact/contact.service.ts",
"app/contact/contact.component.ts",
"app/contact/contact.module.ts",
"app/contact/contact-routing.module.ts",
"app/crisis/*.ts",
"app/hero/hero-detail.component.ts",
"app/hero/hero-list.component.ts",
"app/hero/hero.service.ts",
"app/hero/hero.component.ts",
"app/hero/hero.module.ts",
"app/hero/hero-routing.module.ts",
"app/core/*.css",
"app/core/*.html",
"app/core/*.ts",
"app/shared/*.css",
"app/shared/*.html",
"app/shared/*.ts",
"main.ts",
"styles.css",
"index.html"
],
"main": "index.html",
"tags": ["NgModule"]
}

View File

@ -1,41 +0,0 @@
{
"description": "NgModule v.3",
"basePath": "src/",
"files": [
"app/app.component.3.ts",
"app/app.module.3.ts",
"app/app-routing.module.3.ts",
"app/highlight.directive.ts",
"app/title.component.html",
"app/title.component.ts",
"app/user.service.ts",
"app/contact/contact.component.css",
"app/contact/contact.component.html",
"app/contact/contact.service.ts",
"app/contact/awesome.pipe.ts",
"app/contact/contact.component.3.ts",
"app/contact/contact.module.3.ts",
"app/contact/contact-routing.module.3.ts",
"app/contact/contact-highlight.directive.ts",
"app/crisis/*.ts",
"app/hero/hero-detail.component.ts",
"app/hero/hero-list.component.ts",
"app/hero/hero.service.ts",
"app/hero/hero.component.3.ts",
"app/hero/hero.module.3.ts",
"app/hero/hero-routing.module.3.ts",
"app/hero/highlight.directive.ts",
"main.3.ts",
"styles.css",
"index.3.html"
],
"main": "index.3.html",
"tags": ["NgModule"]
}

View File

@ -0,0 +1,40 @@
{
"description": "NgModule v.3",
"files": [
"src/app/app.component.3.ts",
"src/app/app.module.3.ts",
"src/app/app-routing.module.3.ts",
"src/app/highlight.directive.ts",
"src/app/title.component.html",
"src/app/title.component.ts",
"src/app/user.service.ts",
"src/app/contact/contact.component.css",
"src/app/contact/contact.component.html",
"src/app/contact/contact.service.ts",
"src/app/contact/awesome.pipe.ts",
"src/app/contact/contact.component.3.ts",
"src/app/contact/contact.module.3.ts",
"src/app/contact/contact-routing.module.3.ts",
"src/app/contact/contact-highlight.directive.ts",
"src/app/crisis/*.ts",
"src/app/hero/hero-detail.component.ts",
"src/app/hero/hero-list.component.ts",
"src/app/hero/hero.service.ts",
"src/app/hero/hero.component.3.ts",
"src/app/hero/hero.module.3.ts",
"src/app/hero/hero-routing.module.3.ts",
"src/app/hero/highlight.directive.ts",
"src/main.3.ts",
"src/styles.css",
"src/index.3.html"
],
"main": "src/index.3.html",
"tags": ["NgModule"]
}

View File

@ -1,13 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<base href="/">
<title>NgModule Minimal</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
</head>
<body>
<body>
<app-root></app-root>
</body>
</body>
</html>

View File

@ -0,0 +1,40 @@
{
"description": "NgModule Final",
"files": [
"src/app/app.component.ts",
"src/app/app.module.ts",
"src/app/app-routing.module.ts",
"src/app/contact/contact.component.css",
"src/app/contact/contact.component.html",
"src/app/contact/contact.service.ts",
"src/app/contact/contact.component.ts",
"src/app/contact/contact.module.ts",
"src/app/contact/contact-routing.module.ts",
"src/app/crisis/*.ts",
"src/app/hero/hero-detail.component.ts",
"src/app/hero/hero-list.component.ts",
"src/app/hero/hero.service.ts",
"src/app/hero/hero.component.ts",
"src/app/hero/hero.module.ts",
"src/app/hero/hero-routing.module.ts",
"src/app/core/*.css",
"src/app/core/*.html",
"src/app/core/*.ts",
"src/app/shared/*.css",
"src/app/shared/*.html",
"src/app/shared/*.ts",
"src/main.ts",
"src/styles.css",
"src/index.html"
],
"main": "src/index.html",
"tags": ["NgModule"]
}

View File

@ -8,18 +8,16 @@ import { AppComponent } from './app.component';
/* Feature Modules */
import { ContactModule } from './contact/contact.module';
// #docregion import-for-root
import { CoreModule } from './core/core.module';
// #enddocregion import-for-root
/* Routing Module */
import { AppRoutingModule } from './app-routing.module';
// #docregion import-for-root
@NgModule({
declarations: [
AppComponent
],
// #docregion import-for-root
imports: [
BrowserModule,
ContactModule,
@ -28,6 +26,11 @@ import { AppRoutingModule } from './app-routing.module';
],
// #enddocregion import-for-root
providers: [],
declarations: [
AppComponent
],
bootstrap: [AppComponent]
// #docregion import-for-root
})
export class AppModule { }
// #enddocregion import-for-root

View File

@ -1,22 +1,26 @@
/* tslint:disable:member-ordering no-unused-variable */
// #docregion whole-core-module
import {
ModuleWithProviders, NgModule,
Optional, SkipSelf } from '@angular/core';
// #docregion whole-core-module
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TitleComponent } from './title.component';
// #docregion user-service
import { UserService } from './user.service';
// #enddocregion user-service
import { UserServiceConfig } from './user.service';
// #docregion user-service
@NgModule({
// #enddocregion user-service
imports: [ CommonModule ],
declarations: [ TitleComponent ],
exports: [ TitleComponent ],
// #docregion user-service
providers: [ UserService ]
})
export class CoreModule {
// #enddocregion user-service
// #docregion ctor
constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
if (parentModule) {
@ -24,8 +28,7 @@ export class CoreModule {
'CoreModule is already loaded. Import it in the AppModule only');
}
}
// #enddocregion ctor
// #enddocregion ctor
// #docregion for-root
static forRoot(config: UserServiceConfig): ModuleWithProviders {
@ -36,9 +39,8 @@ export class CoreModule {
]
};
}
// #enddocregion for-root
// #docregion user-service
}
// #enddocregion user-service
// #enddocregion whole-core-module

View File

@ -1,11 +1,10 @@
{
"description": "NgModules",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js",
"!**/*.[1,2].*"
],
"open": "app/app.component.ts",
"file": "src/app/app.component.ts",
"tags": ["NgModules"]
}

View File

@ -1,6 +1,5 @@
{
"description": "Pipes",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js"],

View File

@ -1,26 +1,25 @@
import { Component, OnInit } from '@angular/core';
import { User } from './core/user';
import { UserService } from './core/user.service';
import { User, UserService } from './user.service';
// #docregion component-providers
@Component({
// #enddocregion component-providers
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
// #docregion component-providers
providers: [UserService]
})
// #enddocregion component-providers
export class AppComponent implements OnInit {
title = 'Users list';
users: User[];
constructor(private userService: UserService) { }
getUsers(): void {
ngOnInit(): void {
this.userService.getUsers().then(users => this.users = users);
}
ngOnInit(): void {
this.getUsers();
}
}

View File

@ -1,25 +1,13 @@
// #docplaster
// #docregion app-module
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
// CoreModule provides the UserService.
import { CoreModule } from './core/core.module';
import { UserService } from './user.service';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
CoreModule
],
bootstrap: [AppComponent]
imports: [ BrowserModule ],
providers: [ UserService ],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
// #enddocregion app-module

View File

@ -1,16 +0,0 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { UserService } from './user.service';
@NgModule({
imports: [
CommonModule,
FormsModule
],
declarations: [],
providers: [UserService]
})
export class CoreModule { }

View File

@ -1,14 +0,0 @@
import { User } from './user';
export const USERS: User[] = [
{ id: 1, name: 'Maria' },
{ id: 2, name: 'Alex' },
{ id: 3, name: 'Chuntao' },
{ id: 4, name: 'Béatrice' },
{ id: 5, name: 'Sarah' },
{ id: 6, name: 'Andrés' },
{ id: 7, name: 'Abdul' },
{ id: 8, name: 'Pierre' },
{ id: 9, name: 'Jiao' },
{ id: 10, name: 'Seth' }
];

View File

@ -1,15 +0,0 @@
import { Injectable } from '@angular/core';
import { User } from './user';
import { USERS } from './mock-users';
@Injectable()
export class UserService {
constructor() { }
getUsers(): Promise<User[]> {
return Promise.resolve(USERS);
}
}

View File

@ -1,4 +0,0 @@
export class User {
id: number;
name: string;
}

View File

@ -0,0 +1,28 @@
import { Injectable } from '@angular/core';
export class User {
id: number;
name: string;
}
@Injectable()
export class UserService {
constructor() { }
getUsers(): Promise<User[]> {
return Promise.resolve([
{ id: 1, name: 'Maria' },
{ id: 2, name: 'Alex' },
{ id: 3, name: 'Chuntao' },
{ id: 4, name: 'Béatrice' },
{ id: 5, name: 'Sarah' },
{ id: 6, name: 'Andrés' },
{ id: 7, name: 'Abdul' },
{ id: 8, name: 'Pierre' },
{ id: 9, name: 'Jiao' },
{ id: 10, name: 'Seth' }
]);
}
}

View File

@ -1,11 +1,10 @@
{
"description": "Providers",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js",
"!**/*.[1,2].*"
],
"open": "app/app.component.ts",
"file": "src/app/app.component.ts",
"tags": ["providers"]
}

View File

@ -1,12 +0,0 @@
{
"description": "QuickStart",
"basePath": "src/",
"files": [
"app/app.component.ts",
"app/app.module.ts",
"main.ts",
"index.html"
],
"open": "app/app.component.ts",
"tags": ["quickstart"]
}

View File

@ -0,0 +1,11 @@
{
"description": "QuickStart",
"files": [
"src/app/app.component.ts",
"src/app/app.module.ts",
"src/main.ts",
"src/index.html"
],
"file": "src/app/app.component.ts",
"tags": ["quickstart"]
}

View File

@ -1,25 +0,0 @@
{
"description": "Angular Reactive Forms (final)",
"basePath": "src/",
"files":[
"styles.css",
"app/app.component.ts",
"app/app.component.html",
"app/app.component.css",
"app/app.module.ts",
"app/data-model.ts",
"app/hero.service.ts",
"app/hero-detail/hero-detail.component.html",
"app/hero-detail/hero-detail.component.ts",
"app/hero-detail/hero-detail.component.css",
"app/hero-list/hero-list.component.html",
"app/hero-list/hero-list.component.ts",
"app/hero-list/hero-list.component.css",
"main-final.ts",
"index-final.html"
],
"main": "index-final.html",
"tags": ["reactive", "forms"]
}

View File

@ -0,0 +1,24 @@
{
"description": "Angular Reactive Forms (final)",
"files":[
"src/styles.css",
"src/app/app.component.ts",
"src/app/app.component.html",
"src/app/app.component.css",
"src/app/app.module.ts",
"src/app/data-model.ts",
"src/app/hero.service.ts",
"src/app/hero-detail/hero-detail.component.html",
"src/app/hero-detail/hero-detail.component.ts",
"src/app/hero-detail/hero-detail.component.css",
"src/app/hero-list/hero-list.component.html",
"src/app/hero-list/hero-list.component.ts",
"src/app/hero-list/hero-list.component.css",
"src/main-final.ts",
"src/index-final.html"
],
"main": "src/index-final.html",
"tags": ["reactive", "forms"]
}

View File

@ -1,15 +1,17 @@
<!DOCTYPE html>
<!-- #docregion -->
<html lang="en">
<head>
<head>
<title>Hero Form</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- #docregion bootstrap -->
<link rel="stylesheet" href="https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css">
</head>
</head>
<body>
<body>
<app-root></app-root>
</body>
</body>
</html>

View File

@ -1,15 +1,14 @@
{
"description": "Angular Reactive Forms (Demo runner)",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js",
"!app/app.component.1.ts",
"!app/hero-list.component.1.html",
"!src/app/app.component.1.ts",
"!src/app/hero-list.component.1.html",
"!app/main-final.ts",
"!index-final.html"
"!src/app/main-final.ts",
"!src/index-final.html"
],
"tags": ["reactive", "forms"]
}

View File

@ -1,12 +1,11 @@
{
"description": "Router",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js",
"!**/*.[0-9].*",
"!app/crisis-list.component.ts",
"!app/hero-list.component.ts"
"!src/app/crisis-list.component.ts",
"!src/app/hero-list.component.ts"
],
"tags": ["router"]
}

View File

@ -1,6 +1,5 @@
{
"description": "Content Security",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js"

View File

@ -1,5 +0,0 @@
{
"description": "Service Worker",
"basePath": "src/",
"tags": ["service worker"]
}

View File

@ -1,6 +1,5 @@
{
"description": "Set The Document Title In Angular",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js",

View File

@ -1,13 +0,0 @@
{
"description": "QuickStart Setup",
"basePath": "src/",
"files": [
"app/app.component.ts",
"app/app.module.ts",
"index.html",
"main.ts",
"styles.css"
],
"open": "app/app.component.ts",
"tags": ["quickstart", "setup", "seed"]
}

View File

@ -1,13 +0,0 @@
{
"description": "Quickstart AppComponent Testing",
"basePath": "src/",
"files":[
"browser-test-shim.js",
"app/app.component.ts",
"app/app.component.spec.ts",
"quickstart-specs.html"
],
"main": "quickstart-specs.html",
"open": "app/app.component.spec.ts",
"tags": ["quickstart", "setup", "testing"]
}

View File

@ -0,0 +1,12 @@
{
"description": "Quickstart AppComponent Testing",
"files":[
"src/browser-test-shim.js",
"src/app/app.component.ts",
"src/app/app.component.spec.ts",
"src/quickstart-specs.html"
],
"main": "src/quickstart-specs.html",
"file": "src/app/app.component.spec.ts",
"tags": ["quickstart", "setup", "testing"]
}

View File

@ -0,0 +1,12 @@
{
"description": "QuickStart Setup",
"files": [
"src/app/app.component.ts",
"src/app/app.module.ts",
"src/index.html",
"src/main.ts",
"src/styles.css"
],
"file": "src/app/app.component.ts",
"tags": ["quickstart", "setup", "seed"]
}

View File

@ -1,10 +1,9 @@
{
"description": "Structural directives",
"basePath": "src/",
"files": [
"!**/*.d.ts",
"!**/*.js",
"!app/scrap.txt"
"!src/app/scrap.txt"
],
"tags": [
"structural", "directives", "template", "ngIf",

View File

@ -1,9 +0,0 @@
{
"description": "Style Guide",
"basePath": "src/",
"files":[
"!**/*.d.ts",
"!**/*.js"
],
"tags": ["style guide, styleguide"]
}

View File

@ -1,6 +1,5 @@
{
"description": "Template Syntax Collection",
"basePath": "src/",
"files":["!**/*.d.ts", "!**/*.js"],
"tags": ["template"]
}

Some files were not shown because too many files have changed in this diff Show More