Compare commits
341 Commits
Author | SHA1 | Date | |
---|---|---|---|
b9723f9765 | |||
cb35c26d70 | |||
bb52e22ecf | |||
35a2dfc177 | |||
d8e2829e5b | |||
ac5e6baced | |||
710b4a3503 | |||
5331fc1aab | |||
9b7f2ce6c3 | |||
11b2f62ed2 | |||
e7c37d77a8 | |||
1762047bc0 | |||
9a4c8d543d | |||
f5aaa55f21 | |||
23e6502ef3 | |||
ff0f53c915 | |||
64ef69fb34 | |||
249cd8c2ec | |||
d1fb066d07 | |||
2f977312be | |||
feda017c50 | |||
2991221551 | |||
d7719aa0f5 | |||
54e587a46d | |||
4ac5096232 | |||
3d06b18fee | |||
446153675f | |||
bb1850a912 | |||
93516ea8a1 | |||
c3fa8803d3 | |||
3cad5da5a4 | |||
7a8bd99ab1 | |||
7520ddcf40 | |||
9c1318d731 | |||
062fc4afee | |||
87ec8d13ce | |||
cf034f759a | |||
b0c5d21f31 | |||
cbe5f78c1a | |||
4598af23c0 | |||
d855e90524 | |||
897fc87620 | |||
b37f5fc59b | |||
9730351048 | |||
ce687550ae | |||
563b909279 | |||
c390b06da2 | |||
db4e9ea04a | |||
5e6a3ff6a7 | |||
d0dcabd700 | |||
6ed812ff75 | |||
5461182e25 | |||
cbe95f3d25 | |||
ce57b6fb45 | |||
134f542b36 | |||
c3727f330b | |||
d313aad671 | |||
a54fe634ee | |||
ccb6c45466 | |||
800b1b060e | |||
ab03852234 | |||
f90258162a | |||
745731e1a3 | |||
11b0213d20 | |||
cd29d68f3c | |||
da668848c9 | |||
bfd5f27525 | |||
9f66c9c1d1 | |||
1259fe75c9 | |||
e9db74f937 | |||
f99cb96533 | |||
1e848d696b | |||
1bfa7c6f14 | |||
05d1008a08 | |||
9a98fc0f05 | |||
2ca6258a0f | |||
24c34385ee | |||
e07b7ea114 | |||
73c7503ae0 | |||
79db6c3d19 | |||
b6ddacdccf | |||
c9983e6440 | |||
51098c4f86 | |||
4624406ce8 | |||
76269f4a1f | |||
50174d9fb5 | |||
648de7dd86 | |||
9d40ab9e20 | |||
691e86c9bf | |||
8fa4453aec | |||
93d8f8cd63 | |||
c2fca3d9e0 | |||
8b31178647 | |||
e951612af2 | |||
b668c2c781 | |||
ecd0348d96 | |||
69b86925b3 | |||
5293794316 | |||
728c9d0632 | |||
01d93f3af8 | |||
a0d124bd91 | |||
57bc245cb4 | |||
bc431888f3 | |||
ec028b8109 | |||
014594fe8f | |||
3c8a61e40c | |||
bccfaa46ec | |||
2f442062d2 | |||
840cb3d69e | |||
7dfa0b9da9 | |||
f5d0fac800 | |||
baecb553a6 | |||
6e89f0bf8d | |||
f21ff904c2 | |||
38a7e0d1c7 | |||
90814e4449 | |||
e927aeae86 | |||
a77b126d72 | |||
82417b3ca5 | |||
5b141fbf27 | |||
268884296a | |||
ea8ffc9841 | |||
6d930d2fc5 | |||
2ddf3bcdd1 | |||
0a3a9afe58 | |||
5a88d2f68b | |||
7165eb15bd | |||
e20a72280b | |||
abecf3eb6d | |||
7c418a7e06 | |||
58f080a325 | |||
be719e4817 | |||
11b54f69e5 | |||
4a3c66fe22 | |||
9a5084412d | |||
24670667f1 | |||
3f307ff061 | |||
7433da546f | |||
eda2a7b2dc | |||
196203f6d7 | |||
46b0c7a18c | |||
b6a0098aa3 | |||
7d986ae5dc | |||
a2bdcc9ba8 | |||
624b5a5f83 | |||
b57c9605ce | |||
49dfc9fe2d | |||
8f9ba62dc3 | |||
16673fa38b | |||
49d97e1216 | |||
a73050de48 | |||
2535769a65 | |||
b1a3c47766 | |||
8479e9e6d7 | |||
c0b1bbea3e | |||
092f0df7a6 | |||
dfc81c3dab | |||
6649743a2d | |||
56c46d70f7 | |||
c36ec9bf60 | |||
86396a43e9 | |||
590e68c251 | |||
bd704c90dd | |||
ea4afebeb9 | |||
886cca028f | |||
4054055d0d | |||
09c4cb2540 | |||
8ad464d90e | |||
65af9641c2 | |||
cb5a7efa91 | |||
ce47d33cd9 | |||
2e47a0d19f | |||
6a2e08d0a8 | |||
fdb3f26448 | |||
14b7dfa007 | |||
9394835db4 | |||
70b1d6dd9d | |||
d263595c63 | |||
9cb5964b4d | |||
3ad0cc5736 | |||
f09fd6ec16 | |||
8cfa58715c | |||
909264feb5 | |||
cc1ed77dd8 | |||
7d69a91bfe | |||
a6545ddd4d | |||
498bd64d9c | |||
ad9a3a2d3b | |||
2da0f1639f | |||
3ec58ecea0 | |||
061475402c | |||
8f1359d25f | |||
8659bd2c4b | |||
4a052cd343 | |||
28c2a71cfc | |||
69b37fff26 | |||
df619adc76 | |||
374bf1ed98 | |||
540581da3e | |||
6f5fccfeb7 | |||
14669f20bf | |||
075f3f8c9f | |||
2798c1bbec | |||
38d75d410e | |||
04fb29b589 | |||
9037593ab8 | |||
3ced940b5a | |||
f5a98d98c8 | |||
0799f184dc | |||
c530c5d317 | |||
91b2e394d5 | |||
a487563768 | |||
0ab04bd62c | |||
46ce3317c3 | |||
83527fd4fb | |||
6d12aa978d | |||
96aa2365ae | |||
258d5392d5 | |||
09d9f5fe54 | |||
d8b73e4223 | |||
4c566dbfbb | |||
bde9771991 | |||
fe0d02fc47 | |||
7b005aadc1 | |||
7764c5c697 | |||
c6917d9d4f | |||
25132bff86 | |||
0e38bf9de0 | |||
309bae0a0b | |||
ae70293df3 | |||
1e623a3710 | |||
928e2543cd | |||
92e14a36f9 | |||
34a1990c57 | |||
e4c3882a81 | |||
62f9738a9a | |||
a562c64ed6 | |||
8c726ea87e | |||
c8be3960a0 | |||
759af8b56b | |||
97deb01b1f | |||
ad639d783f | |||
e1c2e50d92 | |||
dd4e3f8704 | |||
08941aa0c7 | |||
03fb766428 | |||
2454a3b641 | |||
3e793f079d | |||
5fbb0d050c | |||
71a8627c5d | |||
5c38012980 | |||
7c2ce296d3 | |||
9d37d86223 | |||
21ef5a1961 | |||
46f8a6dd85 | |||
0aa90c6be4 | |||
c05a8cf7bb | |||
4c21114087 | |||
65bb2373ae | |||
8c925bca71 | |||
330a8c90e4 | |||
d8c35c893b | |||
0fe308c0ef | |||
2d14c3b17a | |||
8ef621ad2a | |||
28bf222a6a | |||
9e883f5873 | |||
43a9619e57 | |||
f518e3a75f | |||
146b30796e | |||
5942b2b27c | |||
330b1090f4 | |||
3ccbe28d9f | |||
67719f2185 | |||
6388768d73 | |||
1dda05a965 | |||
14fd78fd85 | |||
a9321b1387 | |||
19cb503531 | |||
9f2acf54bc | |||
9c77a7cdaf | |||
d58a242fe7 | |||
910c0d9ee7 | |||
331b9f6425 | |||
49162784a8 | |||
0c36f2353d | |||
a580f8c61f | |||
f368381d12 | |||
7c2f795ea6 | |||
93d48f1d89 | |||
861953c95c | |||
aa16ccda79 | |||
6269d28bb0 | |||
d438b88f19 | |||
8e03f65645 | |||
606b8fafb0 | |||
b7fa5dec21 | |||
a5c972aa8b | |||
d05aa70c6b | |||
eac99c1b16 | |||
b7a89cec59 | |||
9e0d7be014 | |||
99951911d5 | |||
fd72fad8fd | |||
ff82756415 | |||
d28243d5fc | |||
447e534350 | |||
cda887896a | |||
09b548db75 | |||
920bf373fe | |||
a9ae4daab2 | |||
15662efec4 | |||
5846c46b76 | |||
816b389759 | |||
6605dd1c7c | |||
837ed788f4 | |||
2e4fe7fd2e | |||
52ea193638 | |||
5e3ef775d5 | |||
228238e602 | |||
a6fd22c399 | |||
1616cae5cf | |||
d5cf684d99 | |||
c9e51d9911 | |||
b2830384f5 | |||
487a0e1b5d | |||
8fe42e58b3 | |||
afb17a5b6e | |||
b8f3533d53 | |||
4918cd241f | |||
45983301d5 | |||
acf57def13 | |||
800591db00 | |||
159c98c202 | |||
c837b3dfb9 | |||
53b89ec312 | |||
c17b912eb9 | |||
8785b2bf6d | |||
fb1be83a1b | |||
ea848f74af | |||
b8d5f87f96 |
@ -176,7 +176,8 @@ groups:
|
|||||||
- "packages/language-service/*"
|
- "packages/language-service/*"
|
||||||
users:
|
users:
|
||||||
- chuckjaz #primary
|
- chuckjaz #primary
|
||||||
# needs secondary
|
- tbosch #secondary
|
||||||
|
- vicb
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
|
||||||
@ -185,8 +186,8 @@ groups:
|
|||||||
files:
|
files:
|
||||||
- "packages/router/*"
|
- "packages/router/*"
|
||||||
users:
|
users:
|
||||||
- vicb #primary
|
- jasonaden
|
||||||
# needs secondary
|
- vicb
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
|
||||||
|
@ -48,12 +48,14 @@ env:
|
|||||||
- CI_MODE=browserstack_optional
|
- CI_MODE=browserstack_optional
|
||||||
- CI_MODE=docs_test
|
- CI_MODE=docs_test
|
||||||
- CI_MODE=aio
|
- CI_MODE=aio
|
||||||
|
- CI_MODE=aio_e2e
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- env: "CI_MODE=saucelabs_optional"
|
- env: "CI_MODE=saucelabs_optional"
|
||||||
- env: "CI_MODE=browserstack_optional"
|
- env: "CI_MODE=browserstack_optional"
|
||||||
|
- env: "CI_MODE=aio_e2e"
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# source the env.sh script so that the exported variables are available to other scripts later on
|
# source the env.sh script so that the exported variables are available to other scripts later on
|
||||||
|
218
CHANGELOG.md
218
CHANGELOG.md
@ -1,3 +1,221 @@
|
|||||||
|
<a name="4.1.0"></a>
|
||||||
|
# [4.1.0](https://github.com/angular/angular/compare/4.1.0-rc.0...4.1.0) (2017-04-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **aio:** AppComponent should scroll only once when location changes ([ac5e6ba](https://github.com/angular/angular/commit/ac5e6ba))
|
||||||
|
* **aio:** copy button placement fix ([23e6502](https://github.com/angular/angular/commit/23e6502))
|
||||||
|
* **aio:** fix URL redirection for API pages ([54e587a](https://github.com/angular/angular/commit/54e587a))
|
||||||
|
* **aio:** header anchor placement ([b0c5d21](https://github.com/angular/angular/commit/b0c5d21))
|
||||||
|
* **aio:** resource nav ([35a2dfc](https://github.com/angular/angular/commit/35a2dfc))
|
||||||
|
* **aio:** strip leading slashes from path (and improve DRY-ness) ([#16238](https://github.com/angular/angular/issues/16238)) ([9c1318d](https://github.com/angular/angular/commit/9c1318d)), closes [#16230](https://github.com/angular/angular/issues/16230)
|
||||||
|
* **aio:** use SVG icons for page load sensitive UI ([c3fa880](https://github.com/angular/angular/commit/c3fa880)), closes [#16100](https://github.com/angular/angular/issues/16100)
|
||||||
|
* **router:** forward the query parameters in the ng1 -> ng2 url sync ([#16249](https://github.com/angular/angular/issues/16249)) ([2f97731](https://github.com/angular/angular/commit/2f97731)), closes [#16067](https://github.com/angular/angular/issues/16067)
|
||||||
|
* **upgrade:** use correct attribute name for upgraded component's bindings ([#16128](https://github.com/angular/angular/issues/16128)) ([d1fb066](https://github.com/angular/angular/commit/d1fb066)), closes [#8856](https://github.com/angular/angular/issues/8856)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **aio:** api page column layout ([64ef69f](https://github.com/angular/angular/commit/64ef69f))
|
||||||
|
* **aio:** api page styles ([cf034f7](https://github.com/angular/angular/commit/cf034f7))
|
||||||
|
* **aio:** api pages styling ([bb52e22](https://github.com/angular/angular/commit/bb52e22))
|
||||||
|
* **aio:** boilerplate:add cleans (removes) before adding ([d8e2829](https://github.com/angular/angular/commit/d8e2829))
|
||||||
|
* **aio:** copy code snackbar and design updates ([e7c37d7](https://github.com/angular/angular/commit/e7c37d7))
|
||||||
|
* **aio:** don't animate sidenav on launch. ([11b2f62](https://github.com/angular/angular/commit/11b2f62))
|
||||||
|
* **aio:** dont set query params during search [#16125](https://github.com/angular/angular/issues/16125) ([#16217](https://github.com/angular/angular/issues/16217)) ([7520ddc](https://github.com/angular/angular/commit/7520ddc))
|
||||||
|
* **aio:** layout max width and design cleanup ([710b4a3](https://github.com/angular/angular/commit/710b4a3))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **aio:** improve unit test rebuild time ([d7719aa](https://github.com/angular/angular/commit/d7719aa))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="4.1.0-rc.0"></a>
|
||||||
|
# [4.1.0-rc.0](https://github.com/angular/angular/compare/4.1.0-beta.0...4.1.0-rc.0) (2017-04-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **benchpress:** chrome - prevent trace buffer overflow ([2f44206](https://github.com/angular/angular/commit/2f44206))
|
||||||
|
* **benchpress:** Update types for TypeScript nullability support ([14669f2](https://github.com/angular/angular/commit/14669f2))
|
||||||
|
* **common:** Update types for TypeScript nullability support ([d8b73e4](https://github.com/angular/angular/commit/d8b73e4))
|
||||||
|
* **compiler:** fix build error in xliff2 ([bd704c9](https://github.com/angular/angular/commit/bd704c9))
|
||||||
|
* **compiler:** fix inheritance for AOT with summaries ([#15583](https://github.com/angular/angular/issues/15583)) ([8ef621a](https://github.com/angular/angular/commit/8ef621a))
|
||||||
|
* **compiler:** ignore calls to unresolved symbols in metadata ([38a7e0d](https://github.com/angular/angular/commit/38a7e0d)), closes [#15969](https://github.com/angular/angular/issues/15969)
|
||||||
|
* **compiler:** ignore calls to unresolved symbols in metadata ([#15970](https://github.com/angular/angular/issues/15970)) ([ce47d33](https://github.com/angular/angular/commit/ce47d33)), closes [#15969](https://github.com/angular/angular/issues/15969)
|
||||||
|
* **compiler:** Inform user where Quoted error was thrown ([a77b126](https://github.com/angular/angular/commit/a77b126))
|
||||||
|
* **compiler:** make I18NHtmlParser provider AoT-compliant ([#15980](https://github.com/angular/angular/issues/15980)) ([745731e](https://github.com/angular/angular/commit/745731e))
|
||||||
|
* **compiler:** support `<ng-container>` whatever the namespace ([5b141fb](https://github.com/angular/angular/commit/5b141fb)), closes [#14257](https://github.com/angular/angular/issues/14257)
|
||||||
|
* **compiler:** suppress another closure warning ([#16137](https://github.com/angular/angular/issues/16137)) ([11b0213](https://github.com/angular/angular/commit/11b0213))
|
||||||
|
* **compiler:** Update types for TypeScript nullability support ([09d9f5f](https://github.com/angular/angular/commit/09d9f5f))
|
||||||
|
* **core:** benchmarks - enable ng1 benchmark again ([bccfaa4](https://github.com/angular/angular/commit/bccfaa4))
|
||||||
|
* **core:** distribute externs for testability API ([#16179](https://github.com/angular/angular/issues/16179)) ([da66884](https://github.com/angular/angular/commit/da66884))
|
||||||
|
* **core:** key-value differ changes iteration ([#15968](https://github.com/angular/angular/issues/15968)) ([cb5a7ef](https://github.com/angular/angular/commit/cb5a7ef)), closes [#14997](https://github.com/angular/angular/issues/14997)
|
||||||
|
* **forms:** Update types for TypeScript nullability support ([6649743](https://github.com/angular/angular/commit/6649743))
|
||||||
|
* **forms:** Update types for TypeScript nullability support ([57bc245](https://github.com/angular/angular/commit/57bc245))
|
||||||
|
* **forms:** Update types for TypeScript nullability support ([#15859](https://github.com/angular/angular/issues/15859)) ([6a2e08d](https://github.com/angular/angular/commit/6a2e08d))
|
||||||
|
* **http:** Update types for TypeScript nullability support ([c36ec9b](https://github.com/angular/angular/commit/c36ec9b))
|
||||||
|
* **http:** Update types for TypeScript nullability support ([ec028b8](https://github.com/angular/angular/commit/ec028b8))
|
||||||
|
* **language-service:** avoid throwing exceptions when reporting metadata errors ([7764c5c](https://github.com/angular/angular/commit/7764c5c))
|
||||||
|
* **language-service:** detect when there isn't a tsconfig.json ([258d539](https://github.com/angular/angular/commit/258d539)), closes [#15874](https://github.com/angular/angular/issues/15874)
|
||||||
|
* **language-service:** improve resilience to incomplete information ([71a8627](https://github.com/angular/angular/commit/71a8627))
|
||||||
|
* **language-service:** infer correct type of `?.` expressions ([0a3a9af](https://github.com/angular/angular/commit/0a3a9af)), closes [#15885](https://github.com/angular/angular/issues/15885)
|
||||||
|
* **language-service:** initialize static reflector correctly ([fe0d02f](https://github.com/angular/angular/commit/fe0d02f)), closes [#15768](https://github.com/angular/angular/issues/15768)
|
||||||
|
* **language-service:** look for type constructors on canonical symbol ([2ddf3bc](https://github.com/angular/angular/commit/2ddf3bc))
|
||||||
|
* **language-service:** only use canonical symbols ([5a88d2f](https://github.com/angular/angular/commit/5a88d2f))
|
||||||
|
* **language-service:** parse extended i18n forms ([bde9771](https://github.com/angular/angular/commit/bde9771))
|
||||||
|
* **language-service:** resolve any parameter types to any result ([5fbb0d0](https://github.com/angular/angular/commit/5fbb0d0))
|
||||||
|
* **language-service:** respect baseUrl compiler option ([f21ff90](https://github.com/angular/angular/commit/f21ff90)), closes [#15974](https://github.com/angular/angular/issues/15974)
|
||||||
|
* **language-service:** Update types for TypeScript nullability support ([540581d](https://github.com/angular/angular/commit/540581d))
|
||||||
|
* **packaging:** increased buffer size ([#15840](https://github.com/angular/angular/issues/15840)) ([65af964](https://github.com/angular/angular/commit/65af964))
|
||||||
|
* **platform-browser:** Update types for TypeScript nullability support ([728c9d0](https://github.com/angular/angular/commit/728c9d0)), closes [#15898](https://github.com/angular/angular/issues/15898)
|
||||||
|
* **platform-server:** handle innerText ([#15818](https://github.com/angular/angular/issues/15818)) ([9394835](https://github.com/angular/angular/commit/9394835))
|
||||||
|
* **router:** fix query param parsing ([a487563](https://github.com/angular/angular/commit/a487563))
|
||||||
|
* **router:** prevent `RouterLinkActive` from causing an infinite CD loop ([82417b3](https://github.com/angular/angular/commit/82417b3)), closes [#15825](https://github.com/angular/angular/issues/15825)
|
||||||
|
* **router:** relax nullability requirements ([a0d124b](https://github.com/angular/angular/commit/a0d124b))
|
||||||
|
* turn on nullability in the code base. ([5293794](https://github.com/angular/angular/commit/5293794))
|
||||||
|
* Update types for TypeScript nullability support in examples ([6f5fccf](https://github.com/angular/angular/commit/6f5fccf))
|
||||||
|
* **router:** the preloader use the module from the loaded config ([6d12aa9](https://github.com/angular/angular/commit/6d12aa9))
|
||||||
|
* **router:** Update types for TypeScript nullability support ([56c46d7](https://github.com/angular/angular/commit/56c46d7))
|
||||||
|
* **router:** Update types for TypeScript nullability support ([bc43188](https://github.com/angular/angular/commit/bc43188))
|
||||||
|
* **tsc-wrapped:** collect new expressions with no arguments ([#15908](https://github.com/angular/angular/issues/15908)) ([70b1d6d](https://github.com/angular/angular/commit/70b1d6d)), closes [#15906](https://github.com/angular/angular/issues/15906)
|
||||||
|
* **tsc-wrapped:** ensure valid path separators in metadata ([96aa236](https://github.com/angular/angular/commit/96aa236))
|
||||||
|
* **upgrade:** Update types for TypeScript nullability support ([01d93f3](https://github.com/angular/angular/commit/01d93f3)), closes [#15897](https://github.com/angular/angular/issues/15897)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **animations:** Update types for TypeScript nullability support ([38d75d4](https://github.com/angular/angular/commit/38d75d4)), closes [#15870](https://github.com/angular/angular/issues/15870)
|
||||||
|
* **compiler:** add source files to xmb/xliff translations ([#14705](https://github.com/angular/angular/issues/14705)) ([4054055](https://github.com/angular/angular/commit/4054055)), closes [#14190](https://github.com/angular/angular/issues/14190)
|
||||||
|
* **compiler:** Implement i18n XLIFF 2.0 serializer ([#14185](https://github.com/angular/angular/issues/14185)) ([09c4cb2](https://github.com/angular/angular/commit/09c4cb2)), closes [#11735](https://github.com/angular/angular/issues/11735)
|
||||||
|
* **upgrade:** allow setting the angularjs lib at runtime ([#15168](https://github.com/angular/angular/issues/15168)) ([e927aea](https://github.com/angular/angular/commit/e927aea))
|
||||||
|
* **upgrade:** allow setting the angularjs lib at runtime ([#15168](https://github.com/angular/angular/issues/15168)) ([8ad464d](https://github.com/angular/angular/commit/8ad464d))
|
||||||
|
* **upgrade:** fixes for allow setting the angularjs lib at runtime ([90814e4](https://github.com/angular/angular/commit/90814e4))
|
||||||
|
* add support for TS 2.2 ([3c8a61e](https://github.com/angular/angular/commit/3c8a61e))
|
||||||
|
* add support for TS 2.3 ([014594f](https://github.com/angular/angular/commit/014594f))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="4.0.3"></a>
|
||||||
|
## [4.0.3](https://github.com/angular/angular/compare/4.0.2...4.0.3) (2017-04-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **benchpress:** chrome - prevent trace buffer overflow ([d216f94](https://github.com/angular/angular/commit/d216f94))
|
||||||
|
* **compiler:** fix build error in xliff2 ([1870347](https://github.com/angular/angular/commit/1870347))
|
||||||
|
* **compiler:** ignore calls to unresolved symbols in metadata ([d4038ab](https://github.com/angular/angular/commit/d4038ab)), closes [#15969](https://github.com/angular/angular/issues/15969)
|
||||||
|
* **compiler:** ignore calls to unresolved symbols in metadata ([#15970](https://github.com/angular/angular/issues/15970)) ([db25f08](https://github.com/angular/angular/commit/db25f08)), closes [#15969](https://github.com/angular/angular/issues/15969)
|
||||||
|
* **compiler:** Inform user where Quoted error was thrown ([3184cc5](https://github.com/angular/angular/commit/3184cc5))
|
||||||
|
* **compiler:** suppress another closure warning ([#16137](https://github.com/angular/angular/issues/16137)) ([72e240a](https://github.com/angular/angular/commit/72e240a))
|
||||||
|
* **core:** benchmarks - enable ng1 benchmark again ([ccac4c6](https://github.com/angular/angular/commit/ccac4c6))
|
||||||
|
* **core:** distribute externs for testability API ([#16179](https://github.com/angular/angular/issues/16179)) ([e377d9d](https://github.com/angular/angular/commit/e377d9d))
|
||||||
|
* **core:** key-value differ changes iteration ([#15968](https://github.com/angular/angular/issues/15968)) ([a8600dc](https://github.com/angular/angular/commit/a8600dc)), closes [#14997](https://github.com/angular/angular/issues/14997)
|
||||||
|
* **language-service:** only use canonical symbols ([786093a](https://github.com/angular/angular/commit/786093a))
|
||||||
|
* **packaging:** increased buffer size ([#15840](https://github.com/angular/angular/issues/15840)) ([88ad490](https://github.com/angular/angular/commit/88ad490))
|
||||||
|
* **platform-server:** handle innerText ([#15818](https://github.com/angular/angular/issues/15818)) ([7de340d](https://github.com/angular/angular/commit/7de340d))
|
||||||
|
* **router:** prevent `RouterLinkActive` from causing an infinite CD loop ([4479c42](https://github.com/angular/angular/commit/4479c42)), closes [#15825](https://github.com/angular/angular/issues/15825)
|
||||||
|
* **tsc-wrapped:** collect new expressions with no arguments ([#15908](https://github.com/angular/angular/issues/15908)) ([41cac9e](https://github.com/angular/angular/commit/41cac9e)), closes [#15906](https://github.com/angular/angular/issues/15906)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **compiler:** Implement i18n XLIFF 2.0 serializer ([#14185](https://github.com/angular/angular/issues/14185)) ([a7d8edd](https://github.com/angular/angular/commit/a7d8edd)), closes [#11735](https://github.com/angular/angular/issues/11735)
|
||||||
|
* **upgrade:** allow setting the angularjs lib at runtime ([#15168](https://github.com/angular/angular/issues/15168)) ([a75d056](https://github.com/angular/angular/commit/a75d056))
|
||||||
|
* **upgrade:** allow setting the angularjs lib at runtime ([#15168](https://github.com/angular/angular/issues/15168)) ([4f172b0](https://github.com/angular/angular/commit/4f172b0))
|
||||||
|
* **upgrade:** fixes for allow setting the angularjs lib at runtime ([bb6932d](https://github.com/angular/angular/commit/bb6932d))
|
||||||
|
* add support for TS 2.3 ([5cf101f](https://github.com/angular/angular/commit/5cf101f))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="4.1.0-beta.1"></a>
|
||||||
|
# [4.1.0-beta.1](https://github.com/angular/angular/compare/4.1.0-beta.0...4.1.0-beta.1) (2017-04-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **compiler:** fix inheritance for AOT with summaries ([#15583](https://github.com/angular/angular/issues/15583)) ([8ef621a](https://github.com/angular/angular/commit/8ef621a))
|
||||||
|
* **language-service:** avoid throwing exceptions when reporting metadata errors ([7764c5c](https://github.com/angular/angular/commit/7764c5c))
|
||||||
|
* **language-service:** detect when there isn't a tsconfig.json ([258d539](https://github.com/angular/angular/commit/258d539)), closes [#15874](https://github.com/angular/angular/issues/15874)
|
||||||
|
* **language-service:** improve resilience to incomplete information ([71a8627](https://github.com/angular/angular/commit/71a8627))
|
||||||
|
* **language-service:** initialize static reflector correctly ([fe0d02f](https://github.com/angular/angular/commit/fe0d02f)), closes [#15768](https://github.com/angular/angular/issues/15768)
|
||||||
|
* **language-service:** parse extended i18n forms ([bde9771](https://github.com/angular/angular/commit/bde9771))
|
||||||
|
* **language-service:** resolve any parameter types to any result ([5fbb0d0](https://github.com/angular/angular/commit/5fbb0d0))
|
||||||
|
* **router:** fix query param parsing ([a487563](https://github.com/angular/angular/commit/a487563))
|
||||||
|
* **router:** the preloader use the module from the loaded config ([6d12aa9](https://github.com/angular/angular/commit/6d12aa9))
|
||||||
|
* **tsc-wrapped:** ensure valid path separators in metadata ([96aa236](https://github.com/angular/angular/commit/96aa236))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **animations:** Update types for TypeScript nullability support ([38d75d4](https://github.com/angular/angular/commit/38d75d4)), closes [#15870](https://github.com/angular/angular/issues/15870)
|
||||||
|
* **benchpress:** Update types for TypeScript nullability support ([14669f2](https://github.com/angular/angular/commit/14669f2))
|
||||||
|
* **common:** Update types for TypeScript nullability support ([d8b73e4](https://github.com/angular/angular/commit/d8b73e4))
|
||||||
|
* **compiler:** Update types for TypeScript nullability support ([09d9f5f](https://github.com/angular/angular/commit/09d9f5f))
|
||||||
|
* **language-service:** Update types for TypeScript nullability support ([540581d](https://github.com/angular/angular/commit/540581d))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="4.0.2"></a>
|
||||||
|
## [4.0.2](https://github.com/angular/angular/compare/4.0.1...4.0.2) (2017-04-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **compiler:** fix inheritance for AOT with summaries ([#15583](https://github.com/angular/angular/issues/15583)) ([1864ccb](https://github.com/angular/angular/commit/1864ccb))
|
||||||
|
* **language-service:** avoid throwing exceptions when reporting metadata errors ([0861fda](https://github.com/angular/angular/commit/0861fda))
|
||||||
|
* **language-service:** detect when there isn't a tsconfig.json ([168a2eb](https://github.com/angular/angular/commit/168a2eb)), closes [#15874](https://github.com/angular/angular/issues/15874)
|
||||||
|
* **language-service:** improve resilience to incomplete information ([e4277a0](https://github.com/angular/angular/commit/e4277a0))
|
||||||
|
* **language-service:** initialize static reflector correctly ([5b99533](https://github.com/angular/angular/commit/5b99533)), closes [#15768](https://github.com/angular/angular/issues/15768)
|
||||||
|
* **language-service:** parse extended i18n forms ([c9c7acd](https://github.com/angular/angular/commit/c9c7acd))
|
||||||
|
* **language-service:** resolve any parameter types to any result ([feae7b6](https://github.com/angular/angular/commit/feae7b6))
|
||||||
|
* **router:** fix query param parsing ([2f41b52](https://github.com/angular/angular/commit/2f41b52))
|
||||||
|
* **router:** the preloader use the module from the loaded config ([978f809](https://github.com/angular/angular/commit/978f809))
|
||||||
|
* **tsc-wrapped:** ensure valid path separators in metadata ([c10e50c](https://github.com/angular/angular/commit/c10e50c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="4.1.0-beta.0"></a>
|
||||||
|
# [4.1.0-beta.0](https://github.com/angular/angular/compare/4.0.0...4.1.0-beta.0) (2017-03-29)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **compiler:** support ICU messages in XLIFF ([b8d5f87](https://github.com/angular/angular/commit/b8d5f87)), closes [#12636](https://github.com/angular/angular/issues/12636) [#15068](https://github.com/angular/angular/issues/15068)
|
||||||
|
|
||||||
|
Note: 4.1.0-beta.0 release also contains all the changes present in the 4.0.1 release.
|
||||||
|
|
||||||
|
|
||||||
|
<a name="4.0.1"></a>
|
||||||
|
## [4.0.1](https://github.com/angular/angular/compare/4.0.0...4.0.1) (2017-03-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **animations:** make sure style calculations are not computed too early ([#15540](https://github.com/angular/angular/issues/15540)) ([c828511](https://github.com/angular/angular/commit/c828511)), closes [#15507](https://github.com/angular/angular/issues/15507)
|
||||||
|
* **compiler:** allow single quotes into named interpolations ([#15461](https://github.com/angular/angular/issues/15461)) ([a654875](https://github.com/angular/angular/commit/a654875)), closes [#15318](https://github.com/angular/angular/issues/15318)
|
||||||
|
* **compiler:** ignore errors when evaluating base classes ([#15560](https://github.com/angular/angular/issues/15560)) ([a88413f](https://github.com/angular/angular/commit/a88413f)), closes [#15536](https://github.com/angular/angular/issues/15536)
|
||||||
|
* **compiler:** throw when a component defines both template and templateUrl ([#15572](https://github.com/angular/angular/issues/15572)) ([902bb2f](https://github.com/angular/angular/commit/902bb2f)), closes [#15566](https://github.com/angular/angular/issues/15566)
|
||||||
|
* **core:** check for undefined on normalizeDebugBindingValue ([#15503](https://github.com/angular/angular/issues/15503)) ([b8c0a97](https://github.com/angular/angular/commit/b8c0a97)), closes [#15494](https://github.com/angular/angular/issues/15494)
|
||||||
|
* **core:** fix inheritance in JIT mode for TS 2.1 ([#15599](https://github.com/angular/angular/issues/15599)) ([ca66530](https://github.com/angular/angular/commit/ca66530)), closes [#15502](https://github.com/angular/angular/issues/15502)
|
||||||
|
* **core:** fix the key/value differ ([#15539](https://github.com/angular/angular/issues/15539)) ([e72124c](https://github.com/angular/angular/commit/e72124c)), closes [#15457](https://github.com/angular/angular/issues/15457)
|
||||||
|
* **core:** improve error msg for invalid KeyValueDiffer.diff arg ([#15489](https://github.com/angular/angular/issues/15489)) ([d74e4d0](https://github.com/angular/angular/commit/d74e4d0)), closes [#15402](https://github.com/angular/angular/issues/15402)
|
||||||
|
* **core:** Update types for TypeScript nullability support ([#15472](https://github.com/angular/angular/issues/15472)) ([8c4b963](https://github.com/angular/angular/commit/8c4b963))
|
||||||
|
* **language-service:** be resilient to invalidate ordering ([#15470](https://github.com/angular/angular/issues/15470)) ([a2c2b87](https://github.com/angular/angular/commit/a2c2b87)), closes [#15466](https://github.com/angular/angular/issues/15466)
|
||||||
|
* **language-service:** correctly determine base members of types ([#15600](https://github.com/angular/angular/issues/15600)) ([0fe4985](https://github.com/angular/angular/commit/0fe4985)), closes [#15460](https://github.com/angular/angular/issues/15460)
|
||||||
|
* **language-service:** don't require `reflect-metadata` module to be provided ([#15569](https://github.com/angular/angular/issues/15569)) ([bfa4f70](https://github.com/angular/angular/commit/bfa4f70)), closes [#15568](https://github.com/angular/angular/issues/15568)
|
||||||
|
* **language-service:** guard access to `Symbol.members` ([#15529](https://github.com/angular/angular/issues/15529)) ([bf25e94](https://github.com/angular/angular/commit/bf25e94)), closes [#15528](https://github.com/angular/angular/issues/15528)
|
||||||
|
* **language-service:** improve performance of `updateModuleAnalysis()` ([#15543](https://github.com/angular/angular/issues/15543)) ([5597fd3](https://github.com/angular/angular/commit/5597fd3))
|
||||||
|
* **router:** should run CanActivate after CanDeactivate guards ([75478b2](https://github.com/angular/angular/commit/75478b2)), closes [#14059](https://github.com/angular/angular/issues/14059) [#15467](https://github.com/angular/angular/issues/15467)
|
||||||
|
* **router:** shouldn't execute CanLoad when a route has been loaded ([2360676](https://github.com/angular/angular/commit/2360676)), closes [#14475](https://github.com/angular/angular/issues/14475) [#15438](https://github.com/angular/angular/issues/15438)
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **router:** don't create new serializer every time UrlTree.toString is called ([#15565](https://github.com/angular/angular/issues/15565)) ([fd61145](https://github.com/angular/angular/commit/fd61145))
|
||||||
|
|
||||||
<a name="4.0.0"></a>
|
<a name="4.0.0"></a>
|
||||||
# [4.0.0](https://github.com/angular/angular/compare/4.0.0-rc.6...4.0.0) invisible-makeover (2017-03-23)
|
# [4.0.0](https://github.com/angular/angular/compare/4.0.0-rc.6...4.0.0) invisible-makeover (2017-03-23)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||||
"project": {
|
"project": {
|
||||||
"version": "1.0.0-beta.32.3",
|
|
||||||
"name": "site"
|
"name": "site"
|
||||||
},
|
},
|
||||||
"apps": [
|
"apps": [
|
||||||
@ -11,13 +11,15 @@
|
|||||||
"assets",
|
"assets",
|
||||||
"content",
|
"content",
|
||||||
"app/search/search-worker.js",
|
"app/search/search-worker.js",
|
||||||
"favicon.ico"
|
"favicon.ico",
|
||||||
|
"pwa-manifest.json"
|
||||||
],
|
],
|
||||||
"index": "index.html",
|
"index": "index.html",
|
||||||
"main": "main.ts",
|
"main": "main.ts",
|
||||||
"polyfills": "polyfills.ts",
|
"polyfills": "polyfills.ts",
|
||||||
"test": "test.ts",
|
"test": "test.ts",
|
||||||
"tsconfig": "tsconfig.json",
|
"tsconfig": "tsconfig.app.json",
|
||||||
|
"testTsconfig": "tsconfig.spec.json",
|
||||||
"prefix": "aio",
|
"prefix": "aio",
|
||||||
"serviceWorker": true,
|
"serviceWorker": true,
|
||||||
"styles": [
|
"styles": [
|
||||||
@ -40,12 +42,13 @@
|
|||||||
},
|
},
|
||||||
"lint": [
|
"lint": [
|
||||||
{
|
{
|
||||||
"files": "src/**/*.ts",
|
"project": "src/tsconfig.app.json"
|
||||||
"project": "src/tsconfig.json"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": "e2e/**/*.ts",
|
"project": "src/tsconfig.spec.json"
|
||||||
"project": "e2e/tsconfig.json"
|
},
|
||||||
|
{
|
||||||
|
"project": "e2e/tsconfig.e2e.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"test": {
|
"test": {
|
||||||
@ -55,19 +58,8 @@
|
|||||||
},
|
},
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"styleExt": "scss",
|
"styleExt": "scss",
|
||||||
"component": {},
|
"component": {
|
||||||
"prefixInterfaces": false,
|
"inlineStyle": true
|
||||||
"inline": {
|
|
||||||
"style": false,
|
|
||||||
"template": false
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"class": false,
|
|
||||||
"component": true,
|
|
||||||
"directive": true,
|
|
||||||
"module": false,
|
|
||||||
"pipe": true,
|
|
||||||
"service": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
48
aio/.gitignore
vendored
48
aio/.gitignore
vendored
@ -1,11 +1,45 @@
|
|||||||
# Ignore node_modules
|
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||||
node_modules
|
|
||||||
|
|
||||||
# Ignore npm/yarn debug log
|
# compiled output
|
||||||
|
/dist
|
||||||
|
/out-tsc
|
||||||
|
/src/content
|
||||||
|
/tmp
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/node_modules
|
||||||
|
|
||||||
|
# IDEs and editors
|
||||||
|
/.idea
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
.c9/
|
||||||
|
*.launch
|
||||||
|
.settings/
|
||||||
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# IDE - VSCode
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
|
||||||
|
# misc
|
||||||
|
/.sass-cache
|
||||||
|
/connect.lock
|
||||||
|
/coverage
|
||||||
|
/libpeerconnection.log
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
testem.log
|
||||||
|
/typings
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
|
||||||
# Ignore generated content
|
# e2e
|
||||||
/dist
|
/e2e/*.js
|
||||||
/src/content
|
/e2e/*.map
|
||||||
/.sass-cache
|
protractor-results*.txt
|
||||||
|
|
||||||
|
# System Files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
@ -1,31 +1,92 @@
|
|||||||
# Site
|
# Angular documentation project (https://angular.io)
|
||||||
|
|
||||||
This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.26.
|
Everything in this folder is part of the documentation project. This includes
|
||||||
|
|
||||||
## Development server
|
* the web site for displaying the documentation
|
||||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
* 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.
|
||||||
|
|
||||||
## Code scaffolding
|
## Developer tasks
|
||||||
|
|
||||||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
|
We use `yarn` to manage the dependencies and to run build tasks.
|
||||||
|
You should run all these tasks from the `angular/aio` folder.
|
||||||
|
Here are the most important tasks you might need to use:
|
||||||
|
|
||||||
## Build
|
* `yarn` - install all the dependencies.
|
||||||
|
* `yarn setup` - Install all the dependencies, boilerplate, plunkers, zips and runs dgeni on the docs.
|
||||||
|
|
||||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
|
* `yarn start` - run a development web server that watches the files; then builds the doc-viewer and reloads the page, as necessary.
|
||||||
|
* `yarn lint` - check that the doc-viewer code follows our style rules.
|
||||||
|
* `yarn test` - watch all the source files, for the doc-viewer, and run all the unit tests when any change.
|
||||||
|
* `yarn e2e` - run all the e2e tests for the doc-viewer.
|
||||||
|
|
||||||
## Running unit tests
|
* `yarn docs` - generate all the docs from the source files.
|
||||||
|
* `yarn docs-watch` - watch the Angular source and the docs files and run a short-circuited doc-gen for the docs that changed.
|
||||||
|
* `yarn docs-lint` - check that the doc gen code follows our style rules.
|
||||||
|
* `yarn docs-test` - run the unit tests for the doc generation code.
|
||||||
|
|
||||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
* `yarn boilerplate:add` - generate all the boilerplate code for the examples, so that they can be run locally.
|
||||||
|
* `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-zips` - generate the zip files from the examples. Zip available via the `live-example` tags in the docs.
|
||||||
|
|
||||||
## Running end-to-end tests
|
|
||||||
|
|
||||||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
|
## Guide to authoring
|
||||||
Before running the tests make sure you are serving the app via `ng serve`.
|
|
||||||
|
|
||||||
## Deploying to GitHub Pages
|
There are two types of content in the documentatation:
|
||||||
|
|
||||||
Run `ng github-pages:deploy` to deploy to GitHub Pages.
|
* **API docs**: descriptions of the modules, classes, interfaces, decorators, etc that make up the Angular platform.
|
||||||
|
API docs are generated directly from the source code.
|
||||||
|
The source code is contained in TypeScript files, located in the `angular/packages` folder.
|
||||||
|
Each API item may have a preceding comment, which contains JSDoc style tags and content.
|
||||||
|
The content is written in markdown.
|
||||||
|
|
||||||
## Further help
|
* **Other content**: guides, tutorials, and other marketing material.
|
||||||
|
All other content is written using markdown in text files, located in the `angular/aio/content` folder.
|
||||||
|
More specifically, there are sub-folders that contain particular types of content: guides, tutorial and marketing.
|
||||||
|
|
||||||
To get more help on the `angular-cli` use `ng help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
|
We use the [dgeni](https://github.com/angular/dgeni) tool to convert these files into docs that can be viewed in the doc-viewer.
|
||||||
|
|
||||||
|
### Generating the complete docs
|
||||||
|
|
||||||
|
The main task for generating the docs is `yarn docs`. This will process all the source files (API and other),
|
||||||
|
extracting the documentation and generating JSON files that can be consumed by the doc-viewer.
|
||||||
|
|
||||||
|
### Partial doc generation for editors
|
||||||
|
|
||||||
|
Full doc generation can take up to one minute. That's too slow for efficient document creation and editing.
|
||||||
|
|
||||||
|
You can make small changes in a smart editor that displays formatted markdown:
|
||||||
|
>In VS Code, _Cmd-K, V_ opens markdown preview in side pane; _Cmd-B_ toggles left sidebar
|
||||||
|
|
||||||
|
You also want to see those changes displayed properly in the doc viewer
|
||||||
|
with a quick, edit/view cycle time.
|
||||||
|
|
||||||
|
For this purpose, use the `yarn docs-watch` task, which watches for changes to source files and only
|
||||||
|
re-processes the the files necessary to generate the docs that are related to the file that has changed.
|
||||||
|
Since this task takes shortcuts, it is much faster (often less than 1 second) but it won't produce full
|
||||||
|
fidelity content. For example, links to other docs and code examples may not render correctly. This is
|
||||||
|
most particularly noticed in links to other docs and in the embedded examples, which may not always render
|
||||||
|
correctly.
|
||||||
|
|
||||||
|
The general setup is as follows:
|
||||||
|
|
||||||
|
* Open a terminal, ensure the dependencies are installed; run an initial doc generation; then start the doc-viewer:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yarn
|
||||||
|
yarn docs
|
||||||
|
yarn start
|
||||||
|
```
|
||||||
|
|
||||||
|
* Open a second terminal and start watching the docs
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yarn docs-watch
|
||||||
|
```
|
||||||
|
|
||||||
|
* Open a browser at https://localhost:4200/ and navigate to the document on which you want to work.
|
||||||
|
You can automatically open the browser by using `yarn start -- -o` in the first terminal.
|
||||||
|
|
||||||
|
* Make changes to the page's associated doc or example files. Every time a file is saved, the doc will
|
||||||
|
be regenerated, the app will rebuild and the page will reload.
|
||||||
|
@ -79,6 +79,11 @@ RUN apt-get update -y && apt-get install -y \
|
|||||||
RUN yarn global add pm2@2
|
RUN yarn global add pm2@2
|
||||||
|
|
||||||
|
|
||||||
|
# Set up log rotation
|
||||||
|
COPY logrotate/* /etc/logrotate.d/
|
||||||
|
RUN chmod 0644 /etc/logrotate.d/*
|
||||||
|
|
||||||
|
|
||||||
# Set up cronjobs
|
# Set up cronjobs
|
||||||
COPY cronjobs/aio-builds-cleanup /etc/cron.d/
|
COPY cronjobs/aio-builds-cleanup /etc/cron.d/
|
||||||
RUN chmod 0744 /etc/cron.d/aio-builds-cleanup
|
RUN chmod 0744 /etc/cron.d/aio-builds-cleanup
|
||||||
|
9
aio/aio-builds-setup/dockerbuild/logrotate/aio-misc
Normal file
9
aio/aio-builds-setup/dockerbuild/logrotate/aio-misc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/var/log/aio/clean-up.log /var/log/aio/init.log /var/log/aio/verify-setup.log {
|
||||||
|
compress
|
||||||
|
create
|
||||||
|
delaycompress
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
notifempty
|
||||||
|
rotate 6
|
||||||
|
}
|
13
aio/aio-builds-setup/dockerbuild/logrotate/aio-nginx
Normal file
13
aio/aio-builds-setup/dockerbuild/logrotate/aio-nginx
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/var/log/aio/nginx/*.log /var/log/aio/nginx-test/*.log {
|
||||||
|
compress
|
||||||
|
create
|
||||||
|
delaycompress
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
notifempty
|
||||||
|
rotate 6
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
service nginx rotate >/dev/null 2>&1
|
||||||
|
endscript
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
/var/log/aio/upload-server-*.log {
|
||||||
|
compress
|
||||||
|
copytruncate
|
||||||
|
delaycompress
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
notifempty
|
||||||
|
rotate 6
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
/dist/
|
/dist
|
||||||
|
/node_modules
|
||||||
|
@ -26,7 +26,7 @@ export class BuildCreator extends EventEmitter {
|
|||||||
all([this.exists(prDir), this.exists(shaDir)]).
|
all([this.exists(prDir), this.exists(shaDir)]).
|
||||||
then(([prDirExisted, shaDirExisted]) => {
|
then(([prDirExisted, shaDirExisted]) => {
|
||||||
if (shaDirExisted) {
|
if (shaDirExisted) {
|
||||||
throw new UploadError(403, `Request to overwrite existing directory: ${shaDir}`);
|
throw new UploadError(409, `Request to overwrite existing directory: ${shaDir}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
dirToRemoveOnError = prDirExisted ? shaDir : prDir;
|
dirToRemoveOnError = prDirExisted ? shaDir : prDir;
|
||||||
|
@ -58,7 +58,7 @@ class UploadServerFactory {
|
|||||||
const githubPullRequests = new GithubPullRequests(githubToken, repoSlug);
|
const githubPullRequests = new GithubPullRequests(githubToken, repoSlug);
|
||||||
|
|
||||||
buildCreator.on(CreatedBuildEvent.type, ({pr, sha}: CreatedBuildEvent) => {
|
buildCreator.on(CreatedBuildEvent.type, ({pr, sha}: CreatedBuildEvent) => {
|
||||||
const body = `The angular.io preview for ${sha.slice(0, 7)} is available [here][1].\n\n` +
|
const body = `The angular.io preview for ${sha} is available [here][1].\n\n` +
|
||||||
`[1]: https://pr${pr}-${sha}.${domainName}/`;
|
`[1]: https://pr${pr}-${sha}.${domainName}/`;
|
||||||
|
|
||||||
githubPullRequests.addComment(pr, body);
|
githubPullRequests.addComment(pr, body);
|
||||||
|
@ -73,7 +73,7 @@ h.runForAllSupportedSchemes((scheme, port) => describe(`integration (on ${scheme
|
|||||||
h.createDummyArchive(pr9, sha9, archivePath);
|
h.createDummyArchive(pr9, sha9, archivePath);
|
||||||
|
|
||||||
uploadBuild(pr9, sha9, archivePath).
|
uploadBuild(pr9, sha9, archivePath).
|
||||||
then(h.verifyResponse(403)).
|
then(h.verifyResponse(409)).
|
||||||
then(() => Promise.all([
|
then(() => Promise.all([
|
||||||
getFile(pr9, sha9, 'index.html').then(h.verifyResponse(200, idxContentRegex9)),
|
getFile(pr9, sha9, 'index.html').then(h.verifyResponse(200, idxContentRegex9)),
|
||||||
getFile(pr9, sha9, 'foo/bar.js').then(h.verifyResponse(200, barContentRegex9)),
|
getFile(pr9, sha9, 'foo/bar.js').then(h.verifyResponse(200, barContentRegex9)),
|
||||||
|
@ -101,7 +101,7 @@ describe('upload-server (on HTTP)', () => {
|
|||||||
expect(h.readBuildFile(pr, sha9, 'index.html')).toBe('My content');
|
expect(h.readBuildFile(pr, sha9, 'index.html')).toBe('My content');
|
||||||
|
|
||||||
h.runCmd(`${curl} http://${host}/create-build/${pr}/${sha9}`).
|
h.runCmd(`${curl} http://${host}/create-build/${pr}/${sha9}`).
|
||||||
then(h.verifyResponse(403, /^Request to overwrite existing directory/)).
|
then(h.verifyResponse(409, /^Request to overwrite existing directory/)).
|
||||||
then(() => expect(h.readBuildFile(pr, sha9, 'index.html')).toBe('My content')).
|
then(() => expect(h.readBuildFile(pr, sha9, 'index.html')).toBe('My content')).
|
||||||
then(done);
|
then(done);
|
||||||
});
|
});
|
||||||
|
@ -66,7 +66,7 @@ describe('BuildCreator', () => {
|
|||||||
it('should throw if the build does already exist', done => {
|
it('should throw if the build does already exist', done => {
|
||||||
bcExistsSpy.and.returnValue(true);
|
bcExistsSpy.and.returnValue(true);
|
||||||
bc.create(pr, sha, archive).catch(err => {
|
bc.create(pr, sha, archive).catch(err => {
|
||||||
expectToBeUploadError(err, 403, `Request to overwrite existing directory: ${shaDir}`);
|
expectToBeUploadError(err, 409, `Request to overwrite existing directory: ${shaDir}`);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -143,7 +143,7 @@ describe('uploadServerFactory', () => {
|
|||||||
|
|
||||||
it('should post a comment on GitHub on \'build.created\'', () => {
|
it('should post a comment on GitHub on \'build.created\'', () => {
|
||||||
const prsAddCommentSpy = spyOn(GithubPullRequests.prototype, 'addComment');
|
const prsAddCommentSpy = spyOn(GithubPullRequests.prototype, 'addComment');
|
||||||
const commentBody = 'The angular.io preview for 1234567 is available [here][1].\n\n' +
|
const commentBody = 'The angular.io preview for 1234567890 is available [here][1].\n\n' +
|
||||||
'[1]: https://pr42-1234567890.domain.name/';
|
'[1]: https://pr42-1234567890.domain.name/';
|
||||||
|
|
||||||
buildCreator.emit(CreatedBuildEvent.type, {pr: 42, sha: '1234567890'});
|
buildCreator.emit(CreatedBuildEvent.type, {pr: 42, sha: '1234567890'});
|
||||||
|
@ -67,8 +67,8 @@ More info on how to set things up on CI can be found [here](misc--integrate-with
|
|||||||
|
|
||||||
### Serving build artifacts
|
### Serving build artifacts
|
||||||
- nginx receives a request for an uploaded resource on a subdomain corresponding to the PR and SHA.
|
- nginx receives a request for an uploaded resource on a subdomain corresponding to the PR and SHA.
|
||||||
E.g.: `pr<PR>-<SHA>.ngbuilds.io/path/to/resurce`
|
E.g.: `pr<PR>-<SHA>.ngbuilds.io/path/to/resource`
|
||||||
- nginx maps the subdomain to the correct sub-direcory and serves the resource.
|
- nginx maps the subdomain to the correct sub-directory and serves the resource.
|
||||||
E.g.: `/<PR>/<SHA>/path/to/resource`
|
E.g.: `/<PR>/<SHA>/path/to/resource`
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,9 +41,10 @@ certificate covering both the domain and subdomains.
|
|||||||
## Create directory for logs (Optional)
|
## Create directory for logs (Optional)
|
||||||
Optionally, a logs directory can pe passed to the docker container for storing non-system-related
|
Optionally, a logs directory can pe passed to the docker container for storing non-system-related
|
||||||
logs. If not provided, the logs are kept locally on the container and will be lost whenever the
|
logs. If not provided, the logs are kept locally on the container and will be lost whenever the
|
||||||
container is replaced (e.g. when updating to use a newer version of the docker image).
|
container is replaced (e.g. when updating to use a newer version of the docker image). Log files are
|
||||||
|
rotated and retained for 6 months.
|
||||||
|
|
||||||
The following files log files are kept in this directory:
|
The following log files are kept in this directory:
|
||||||
|
|
||||||
- `clean-up.log`:
|
- `clean-up.log`:
|
||||||
Output of the `aio-clean-up` command, run as a cronjob for cleaning up the build artifacts of
|
Output of the `aio-clean-up` command, run as a cronjob for cleaning up the build artifacts of
|
||||||
|
75
aio/content/examples/.gitignore
vendored
75
aio/content/examples/.gitignore
vendored
@ -1,17 +1,70 @@
|
|||||||
# _boilerplate files
|
# boilerplate files
|
||||||
!_boilerplate/*
|
**/src/styles.css
|
||||||
*/*/src/styles.css
|
**/src/systemjs-angular-loader.js
|
||||||
*/*/src/systemjs.config.js
|
**/src/systemjs.config.js
|
||||||
*/*/src/tsconfig.json
|
**/src/tsconfig.json
|
||||||
*/*/bs-config.e2e.json
|
**/bs-config.e2e.json
|
||||||
*/*/bs-config.json
|
**/bs-config.json
|
||||||
*/*/package.json
|
**/package.json
|
||||||
*/*/tslint.json
|
**/tslint.json
|
||||||
|
**/karma.conf.js
|
||||||
|
**/karma-test-shim.js
|
||||||
|
**/browser-test-shim.js
|
||||||
|
**/node_modules
|
||||||
|
|
||||||
# example files
|
# built files
|
||||||
|
*.map
|
||||||
_test-output
|
_test-output
|
||||||
protractor-helpers.js
|
protractor-helpers.js
|
||||||
*/e2e-spec.js
|
*/e2e-spec.js
|
||||||
|
**/*.js
|
||||||
**/ts/**/*.js
|
**/ts/**/*.js
|
||||||
**/js-es6*/**/*.js
|
**/js-es6*/**/*.js
|
||||||
**/ts-snippets/**/*.js
|
dist/
|
||||||
|
|
||||||
|
|
||||||
|
# special
|
||||||
|
!/*
|
||||||
|
!*.1.*
|
||||||
|
!*.2.*
|
||||||
|
!*.3.*
|
||||||
|
*.1.js
|
||||||
|
*.2.js
|
||||||
|
*.3.js
|
||||||
|
*.1.js.map
|
||||||
|
*.2.js.map
|
||||||
|
*.3.js.map
|
||||||
|
!systemjs.config.*.js
|
||||||
|
!karma-test-shim.*.js
|
||||||
|
!copy-dist-files.js
|
||||||
|
|
||||||
|
# AngularJS files
|
||||||
|
!**/*.ajs.js
|
||||||
|
**/app/**/*.ajs.js
|
||||||
|
|
||||||
|
# aot
|
||||||
|
**/*.ngfactory.ts
|
||||||
|
**/*.ngsummary.json
|
||||||
|
**/*.shim.ngstyle.ts
|
||||||
|
**/*.metadata.json
|
||||||
|
!aot/bs-config.json
|
||||||
|
!aot/index.html
|
||||||
|
!rollup-config.js
|
||||||
|
|
||||||
|
# testing
|
||||||
|
!testing/src/browser-test-shim.js
|
||||||
|
!testing/karma*.js
|
||||||
|
|
||||||
|
# TS to JS
|
||||||
|
!ts-to-js/js*/**/*.js
|
||||||
|
ts-to-js/js*/**/system*.js
|
||||||
|
|
||||||
|
# webpack
|
||||||
|
!webpack/**/config/*.js
|
||||||
|
!webpack/**/*webpack*.js
|
||||||
|
|
||||||
|
# styleguide
|
||||||
|
!styleguide/src/systemjs.custom.js
|
||||||
|
|
||||||
|
# plunkers
|
||||||
|
*plnkr.no-link.html
|
||||||
|
@ -4,7 +4,6 @@ import { MovieService } from './movie.service';
|
|||||||
import { IMovie } from './movie';
|
import { IMovie } from './movie';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrls: [ './app.component.css' ],
|
styleUrls: [ './app.component.css' ],
|
@ -8,7 +8,6 @@ import { MovieService } from './movie.service';
|
|||||||
|
|
||||||
// #docregion component
|
// #docregion component
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'movie-list',
|
selector: 'movie-list',
|
||||||
templateUrl: './movie-list.component.html',
|
templateUrl: './movie-list.component.html',
|
||||||
// #docregion style-url
|
// #docregion style-url
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@ -1,5 +1,8 @@
|
|||||||
|
// #docregion animations-module
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
// #enddocregion animations-module
|
||||||
|
|
||||||
import { HeroTeamBuilderComponent } from './hero-team-builder.component';
|
import { HeroTeamBuilderComponent } from './hero-team-builder.component';
|
||||||
import { HeroListBasicComponent } from './hero-list-basic.component';
|
import { HeroListBasicComponent } from './hero-list-basic.component';
|
||||||
@ -13,8 +16,10 @@ import { HeroListGroupsComponent } from './hero-list-groups.component';
|
|||||||
import { HeroListMultistepComponent } from './hero-list-multistep.component';
|
import { HeroListMultistepComponent } from './hero-list-multistep.component';
|
||||||
import { HeroListTimingsComponent } from './hero-list-timings.component';
|
import { HeroListTimingsComponent } from './hero-list-timings.component';
|
||||||
|
|
||||||
|
// #docregion animation-module
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ BrowserModule ],
|
imports: [ BrowserModule, BrowserAnimationsModule ],
|
||||||
|
// #enddocregion animation-module
|
||||||
declarations: [
|
declarations: [
|
||||||
HeroTeamBuilderComponent,
|
HeroTeamBuilderComponent,
|
||||||
HeroListBasicComponent,
|
HeroListBasicComponent,
|
@ -1,17 +1,18 @@
|
|||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
trigger,
|
trigger,
|
||||||
state,
|
state,
|
||||||
style,
|
style,
|
||||||
animate,
|
animate,
|
||||||
transition
|
transition
|
||||||
} from '@angular/core';
|
} from '@angular/animations';
|
||||||
|
|
||||||
import { Heroes } from './hero.service';
|
import { Heroes } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list-auto',
|
selector: 'hero-list-auto',
|
||||||
// #docregion template
|
// #docregion template
|
||||||
template: `
|
template: `
|
@ -3,19 +3,20 @@
|
|||||||
// #docregion imports
|
// #docregion imports
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
trigger,
|
trigger,
|
||||||
state,
|
state,
|
||||||
style,
|
style,
|
||||||
transition,
|
animate,
|
||||||
animate
|
transition
|
||||||
} from '@angular/core';
|
} from '@angular/animations';
|
||||||
// #enddocregion imports
|
// #enddocregion imports
|
||||||
|
|
||||||
import { Heroes } from './hero.service';
|
import { Heroes } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list-basic',
|
selector: 'hero-list-basic',
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
/* The click event calls hero.toggleState(), which
|
/* The click event calls hero.toggleState(), which
|
@ -2,19 +2,20 @@
|
|||||||
// #docregion imports
|
// #docregion imports
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
trigger,
|
trigger,
|
||||||
state,
|
state,
|
||||||
style,
|
style,
|
||||||
transition,
|
animate,
|
||||||
animate
|
transition
|
||||||
} from '@angular/core';
|
} from '@angular/animations';
|
||||||
// #enddocregion imports
|
// #enddocregion imports
|
||||||
|
|
||||||
import { Heroes } from './hero.service';
|
import { Heroes } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list-combined-transitions',
|
selector: 'hero-list-combined-transitions',
|
||||||
// #docregion template
|
// #docregion template
|
||||||
template: `
|
template: `
|
@ -1,17 +1,18 @@
|
|||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
trigger,
|
trigger,
|
||||||
state,
|
state,
|
||||||
style,
|
style,
|
||||||
animate,
|
animate,
|
||||||
transition
|
transition
|
||||||
} from '@angular/core';
|
} from '@angular/animations';
|
||||||
|
|
||||||
import { Heroes } from './hero.service';
|
import { Heroes } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list-enter-leave-states',
|
selector: 'hero-list-enter-leave-states',
|
||||||
// #docregion template
|
// #docregion template
|
||||||
template: `
|
template: `
|
@ -1,17 +1,18 @@
|
|||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
trigger,
|
trigger,
|
||||||
state,
|
state,
|
||||||
style,
|
style,
|
||||||
animate,
|
animate,
|
||||||
transition
|
transition
|
||||||
} from '@angular/core';
|
} from '@angular/animations';
|
||||||
|
|
||||||
import { Heroes } from './hero.service';
|
import { Heroes } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list-enter-leave',
|
selector: 'hero-list-enter-leave',
|
||||||
// #docregion template
|
// #docregion template
|
||||||
template: `
|
template: `
|
@ -1,18 +1,19 @@
|
|||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
trigger,
|
trigger,
|
||||||
state,
|
state,
|
||||||
style,
|
style,
|
||||||
animate,
|
animate,
|
||||||
transition,
|
transition,
|
||||||
group
|
group
|
||||||
} from '@angular/core';
|
} from '@angular/animations';
|
||||||
|
|
||||||
import { Heroes } from './hero.service';
|
import { Heroes } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list-groups',
|
selector: 'hero-list-groups',
|
||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
@ -3,17 +3,18 @@
|
|||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input,
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
trigger,
|
trigger,
|
||||||
style,
|
style,
|
||||||
transition,
|
animate,
|
||||||
animate
|
transition
|
||||||
} from '@angular/core';
|
} from '@angular/animations';
|
||||||
// #enddocregion imports
|
// #enddocregion imports
|
||||||
|
|
||||||
import { Heroes } from './hero.service';
|
import { Heroes } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list-inline-styles',
|
selector: 'hero-list-inline-styles',
|
||||||
// #docregion template
|
// #docregion template
|
||||||
template: `
|
template: `
|
@ -1,19 +1,20 @@
|
|||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input,
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
trigger,
|
trigger,
|
||||||
state,
|
state,
|
||||||
style,
|
style,
|
||||||
animate,
|
animate,
|
||||||
transition,
|
transition,
|
||||||
keyframes,
|
keyframes,
|
||||||
AnimationTransitionEvent
|
AnimationEvent
|
||||||
} from '@angular/core';
|
} from '@angular/animations';
|
||||||
|
|
||||||
import { Heroes } from './hero.service';
|
import { Heroes } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list-multistep',
|
selector: 'hero-list-multistep',
|
||||||
// #docregion template
|
// #docregion template
|
||||||
template: `
|
template: `
|
||||||
@ -60,11 +61,11 @@ import { Heroes } from './hero.service';
|
|||||||
export class HeroListMultistepComponent {
|
export class HeroListMultistepComponent {
|
||||||
@Input() heroes: Heroes;
|
@Input() heroes: Heroes;
|
||||||
|
|
||||||
animationStarted(event: AnimationTransitionEvent) {
|
animationStarted(event: AnimationEvent) {
|
||||||
console.warn('Animation started: ', event);
|
console.warn('Animation started: ', event);
|
||||||
}
|
}
|
||||||
|
|
||||||
animationDone(event: AnimationTransitionEvent) {
|
animationDone(event: AnimationEvent) {
|
||||||
console.warn('Animation done: ', event);
|
console.warn('Animation done: ', event);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,17 +1,18 @@
|
|||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
trigger,
|
trigger,
|
||||||
state,
|
state,
|
||||||
style,
|
style,
|
||||||
animate,
|
animate,
|
||||||
transition
|
transition
|
||||||
} from '@angular/core';
|
} from '@angular/animations';
|
||||||
|
|
||||||
import { Heroes } from './hero.service';
|
import { Heroes } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list-timings',
|
selector: 'hero-list-timings',
|
||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
@ -2,19 +2,20 @@
|
|||||||
// #docregion imports
|
// #docregion imports
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
trigger,
|
trigger,
|
||||||
state,
|
state,
|
||||||
style,
|
style,
|
||||||
transition,
|
animate,
|
||||||
animate
|
transition
|
||||||
} from '@angular/core';
|
} from '@angular/animations';
|
||||||
// #enddocregion imports
|
// #enddocregion imports
|
||||||
|
|
||||||
import { Heroes } from './hero.service';
|
import { Heroes } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list-twoway',
|
selector: 'hero-list-twoway',
|
||||||
// #docregion template
|
// #docregion template
|
||||||
template: `
|
template: `
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Animations</title>
|
<title>Animations</title>
|
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@ describe('AOT Compilation', function () {
|
|||||||
browser.get('');
|
browser.get('');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should load page and click button', function (done) {
|
it('should load page and click button', function (done: any) {
|
||||||
let headingSelector = element.all(by.css('h1')).get(0);
|
let headingSelector = element.all(by.css('h1')).get(0);
|
||||||
expect(headingSelector.getText()).toEqual('Hello Angular');
|
expect(headingSelector.getText()).toEqual('Hello Angular');
|
||||||
|
|
@ -15,8 +15,6 @@ export default {
|
|||||||
|
|
||||||
// should intercept ... but doesn't in some rollup versions
|
// should intercept ... but doesn't in some rollup versions
|
||||||
if ( warning.code === 'THIS_IS_UNDEFINED' ) { return; }
|
if ( warning.code === 'THIS_IS_UNDEFINED' ) { return; }
|
||||||
// intercepts in some rollup versions
|
|
||||||
if ( warning.indexOf("The 'this' keyword is equivalent to 'undefined'") > -1 ) { return; }
|
|
||||||
|
|
||||||
// console.warn everything else
|
// console.warn everything else
|
||||||
console.warn( warning.message );
|
console.warn( warning.message );
|
@ -2,7 +2,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: './app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
@ -10,9 +10,6 @@
|
|||||||
|
|
||||||
<script src="node_modules/core-js/client/shim.min.js"></script>
|
<script src="node_modules/core-js/client/shim.min.js"></script>
|
||||||
<script src="node_modules/zone.js/dist/zone.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
<!-- #docregion moduleId -->
|
|
||||||
<script>window.module = 'aot';</script>
|
|
||||||
<!-- #enddocregion moduleId -->
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<my-app>Loading...</my-app>
|
<my-app>Loading...</my-app>
|
@ -8,7 +8,10 @@
|
|||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"lib": ["es2015", "dom"],
|
"lib": ["es2015", "dom"],
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"suppressImplicitAnyIndexErrors": true
|
"suppressImplicitAnyIndexErrors": true,
|
||||||
|
"typeRoots": [
|
||||||
|
"./node_modules/@types/"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"files": [
|
"files": [
|
@ -3,7 +3,6 @@ import { Component, Input } from '@angular/core';
|
|||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-detail',
|
selector: 'hero-detail',
|
||||||
templateUrl: './hero-detail.component.html'
|
templateUrl: './hero-detail.component.html'
|
||||||
})
|
})
|
@ -5,7 +5,6 @@ import { HeroService } from './hero.service';
|
|||||||
|
|
||||||
// #docregion metadata, providers
|
// #docregion metadata, providers
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list',
|
selector: 'hero-list',
|
||||||
templateUrl: './hero-list.component.html',
|
templateUrl: './hero-list.component.html',
|
||||||
providers: [ HeroService ]
|
providers: [ HeroService ]
|
@ -1,481 +0,0 @@
|
|||||||
<html lang="en"><head></head><body><form id="mainForm" method="post" action="http://plnkr.co/edit/?p=preview" target="_self"><input type="hidden" name="files[app/app.component.ts]" value="import { Component } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'my-app',
|
|
||||||
template: `
|
|
||||||
<hero-list></hero-list>
|
|
||||||
<sales-tax></sales-tax>
|
|
||||||
`
|
|
||||||
})
|
|
||||||
export class AppComponent { }
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/app.module.ts]" value="import { BrowserModule } from '@angular/platform-browser';
|
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { AppComponent } from './app.component';
|
|
||||||
import { HeroDetailComponent } from './hero-detail.component';
|
|
||||||
import { HeroListComponent } from './hero-list.component';
|
|
||||||
import { SalesTaxComponent } from './sales-tax.component';
|
|
||||||
import { HeroService } from './hero.service';
|
|
||||||
import { BackendService } from './backend.service';
|
|
||||||
import { Logger } from './logger.service';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
BrowserModule,
|
|
||||||
FormsModule
|
|
||||||
],
|
|
||||||
declarations: [
|
|
||||||
AppComponent,
|
|
||||||
HeroDetailComponent,
|
|
||||||
HeroListComponent,
|
|
||||||
SalesTaxComponent
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
BackendService,
|
|
||||||
HeroService,
|
|
||||||
Logger
|
|
||||||
],
|
|
||||||
bootstrap: [ AppComponent ]
|
|
||||||
})
|
|
||||||
export class AppModule { }
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/backend.service.ts]" value="import { Injectable, Type } from '@angular/core';
|
|
||||||
|
|
||||||
import { Logger } from './logger.service';
|
|
||||||
import { Hero } from './hero';
|
|
||||||
|
|
||||||
const HEROES = [
|
|
||||||
new Hero('Windstorm', 'Weather mastery'),
|
|
||||||
new Hero('Mr. Nice', 'Killing them with kindness'),
|
|
||||||
new Hero('Magneta', 'Manipulates metalic objects')
|
|
||||||
];
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class BackendService {
|
|
||||||
constructor(private logger: Logger) {}
|
|
||||||
|
|
||||||
getAll(type: Type<any>): PromiseLike<any[]> {
|
|
||||||
if (type === Hero) {
|
|
||||||
// TODO get from the database
|
|
||||||
return Promise.resolve<Hero[]>(HEROES);
|
|
||||||
}
|
|
||||||
let err = new Error('Cannot get object of this type');
|
|
||||||
this.logger.error(err);
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/hero-detail.component.ts]" value="import { Component, Input } from '@angular/core';
|
|
||||||
|
|
||||||
import { Hero } from './hero';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-detail',
|
|
||||||
templateUrl: './hero-detail.component.html'
|
|
||||||
})
|
|
||||||
export class HeroDetailComponent {
|
|
||||||
@Input() hero: Hero;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/hero-list.component.ts]" value="import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
import { Hero } from './hero';
|
|
||||||
import { HeroService } from './hero.service';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'hero-list',
|
|
||||||
templateUrl: './hero-list.component.html',
|
|
||||||
providers: [ HeroService ]
|
|
||||||
})
|
|
||||||
export class HeroListComponent implements OnInit {
|
|
||||||
heroes: Hero[];
|
|
||||||
selectedHero: Hero;
|
|
||||||
|
|
||||||
constructor(private service: HeroService) { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.heroes = this.service.getHeroes();
|
|
||||||
}
|
|
||||||
|
|
||||||
selectHero(hero: Hero) { this.selectedHero = hero; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/hero.service.ts]" value="import { Injectable } from '@angular/core';
|
|
||||||
|
|
||||||
import { Hero } from './hero';
|
|
||||||
import { BackendService } from './backend.service';
|
|
||||||
import { Logger } from './logger.service';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class HeroService {
|
|
||||||
private heroes: Hero[] = [];
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private backend: BackendService,
|
|
||||||
private logger: Logger) { }
|
|
||||||
|
|
||||||
getHeroes() {
|
|
||||||
this.backend.getAll(Hero).then( (heroes: Hero[]) => {
|
|
||||||
this.logger.log(`Fetched ${heroes.length} heroes.`);
|
|
||||||
this.heroes.push(...heroes); // fill cache
|
|
||||||
});
|
|
||||||
return this.heroes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/hero.ts]" value="let nextId = 1;
|
|
||||||
|
|
||||||
export class Hero {
|
|
||||||
id: number;
|
|
||||||
constructor(
|
|
||||||
public name: string,
|
|
||||||
public power?: string) {
|
|
||||||
this.id = nextId++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/logger.service.ts]" value="import { Injectable } from '@angular/core';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class Logger {
|
|
||||||
log(msg: any) { console.log(msg); }
|
|
||||||
error(msg: any) { console.error(msg); }
|
|
||||||
warn(msg: any) { console.warn(msg); }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/mini-app.ts]" value="// A mini-application
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class Logger {
|
|
||||||
log(message: string) { console.log(message); }
|
|
||||||
}
|
|
||||||
|
|
||||||
import { Component } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'my-app',
|
|
||||||
template: 'Welcome to Angular'
|
|
||||||
})
|
|
||||||
export class AppComponent {
|
|
||||||
constructor(logger: Logger) {
|
|
||||||
logger.log('Let the fun begin!');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
|
||||||
@NgModule({
|
|
||||||
imports: [ BrowserModule ],
|
|
||||||
providers: [ Logger ],
|
|
||||||
declarations: [ AppComponent ],
|
|
||||||
exports: [ AppComponent ],
|
|
||||||
bootstrap: [ AppComponent ]
|
|
||||||
})
|
|
||||||
export class AppModule { }
|
|
||||||
|
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
||||||
|
|
||||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/sales-tax.component.ts]" value="import { Component } from '@angular/core';
|
|
||||||
|
|
||||||
import { SalesTaxService } from './sales-tax.service';
|
|
||||||
import { TaxRateService } from './tax-rate.service';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'sales-tax',
|
|
||||||
template: `
|
|
||||||
<h2>Sales Tax Calculator</h2>
|
|
||||||
Amount: <input #amountBox (change)="0">
|
|
||||||
|
|
||||||
<div *ngIf="amountBox.value">
|
|
||||||
The sales tax is
|
|
||||||
{{ getTax(amountBox.value) | currency:'USD':true:'1.2-2' }}
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
providers: [SalesTaxService, TaxRateService]
|
|
||||||
})
|
|
||||||
export class SalesTaxComponent {
|
|
||||||
constructor(private salesTaxService: SalesTaxService) { }
|
|
||||||
|
|
||||||
getTax(value: string | number) {
|
|
||||||
return this.salesTaxService.getVAT(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/sales-tax.service.ts]" value="import { Injectable } from '@angular/core';
|
|
||||||
|
|
||||||
import { TaxRateService } from './tax-rate.service';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class SalesTaxService {
|
|
||||||
constructor(private rateService: TaxRateService) { }
|
|
||||||
|
|
||||||
getVAT(value: string | number) {
|
|
||||||
let amount = (typeof value === 'string') ?
|
|
||||||
parseFloat(value) : value;
|
|
||||||
return (amount || 0) * this.rateService.getRate('VAT');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/tax-rate.service.ts]" value="import { Injectable } from '@angular/core';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class TaxRateService {
|
|
||||||
getRate(rateName: string) { return 0.10; } // 10% everywhere
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[main.ts]" value="import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
||||||
import { AppModule } from './app/app.module';
|
|
||||||
|
|
||||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[styles.css]" value="/* Master Styles */
|
|
||||||
h1 {
|
|
||||||
color: #369;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 250%;
|
|
||||||
}
|
|
||||||
h2, h3 {
|
|
||||||
color: #444;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
font-weight: lighter;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
margin: 2em;
|
|
||||||
}
|
|
||||||
body, input[text], button {
|
|
||||||
color: #888;
|
|
||||||
font-family: Cambria, Georgia;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
cursor: pointer;
|
|
||||||
cursor: hand;
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
font-family: Arial;
|
|
||||||
background-color: #eee;
|
|
||||||
border: none;
|
|
||||||
padding: 5px 10px;
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
cursor: hand;
|
|
||||||
}
|
|
||||||
button:hover {
|
|
||||||
background-color: #cfd8dc;
|
|
||||||
}
|
|
||||||
button:disabled {
|
|
||||||
background-color: #eee;
|
|
||||||
color: #aaa;
|
|
||||||
cursor: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Navigation link styles */
|
|
||||||
nav a {
|
|
||||||
padding: 5px 10px;
|
|
||||||
text-decoration: none;
|
|
||||||
margin-right: 10px;
|
|
||||||
margin-top: 10px;
|
|
||||||
display: inline-block;
|
|
||||||
background-color: #eee;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
nav a:visited, a:link {
|
|
||||||
color: #607D8B;
|
|
||||||
}
|
|
||||||
nav a:hover {
|
|
||||||
color: #039be5;
|
|
||||||
background-color: #CFD8DC;
|
|
||||||
}
|
|
||||||
nav a.active {
|
|
||||||
color: #039be5;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* items class */
|
|
||||||
.items {
|
|
||||||
margin: 0 0 2em 0;
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
width: 24em;
|
|
||||||
}
|
|
||||||
.items li {
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
left: 0;
|
|
||||||
background-color: #EEE;
|
|
||||||
margin: .5em;
|
|
||||||
padding: .3em 0;
|
|
||||||
height: 1.6em;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.items li:hover {
|
|
||||||
color: #607D8B;
|
|
||||||
background-color: #DDD;
|
|
||||||
left: .1em;
|
|
||||||
}
|
|
||||||
.items li.selected {
|
|
||||||
background-color: #CFD8DC;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.items li.selected:hover {
|
|
||||||
background-color: #BBD8DC;
|
|
||||||
}
|
|
||||||
.items .text {
|
|
||||||
position: relative;
|
|
||||||
top: -3px;
|
|
||||||
}
|
|
||||||
.items .badge {
|
|
||||||
display: inline-block;
|
|
||||||
font-size: small;
|
|
||||||
color: white;
|
|
||||||
padding: 0.8em 0.7em 0 0.7em;
|
|
||||||
background-color: #607D8B;
|
|
||||||
line-height: 1em;
|
|
||||||
position: relative;
|
|
||||||
left: -1px;
|
|
||||||
top: -4px;
|
|
||||||
height: 1.8em;
|
|
||||||
margin-right: .8em;
|
|
||||||
border-radius: 4px 0 0 4px;
|
|
||||||
}
|
|
||||||
/* everywhere else */
|
|
||||||
* {
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
*/"><input type="hidden" name="files[app/hero-detail.component.html]" value="<hr>
|
|
||||||
<h4>{{hero.name}} Detail</h4>
|
|
||||||
<div>Id: {{hero.id}}</div>
|
|
||||||
<div>Name:
|
|
||||||
<input [(ngModel)]="hero.name">
|
|
||||||
</div>
|
|
||||||
<div>Power:<input [(ngModel)]="hero.power"></div>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
-->"><input type="hidden" name="files[app/hero-list.component.html]" value="<h2>Hero List</h2>
|
|
||||||
|
|
||||||
<p><i>Pick a hero from the list</i></p>
|
|
||||||
<ul>
|
|
||||||
<li *ngFor="let hero of heroes" (click)="selectHero(hero)">
|
|
||||||
{{hero.name}}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<hero-detail *ngIf="selectedHero" [hero]="selectedHero"></hero-detail>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
-->"><input type="hidden" name="files[index.html]" value="<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Architecture of Angular</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<script>document.write('<base href="' + document.location + '" />');</script>
|
|
||||||
<link rel="stylesheet" href="styles.css">
|
|
||||||
|
|
||||||
<!-- Polyfills -->
|
|
||||||
<script src="https://unpkg.com/core-js/client/shim.min.js"></script>
|
|
||||||
|
|
||||||
<script src="https://unpkg.com/zone.js@0.7.4?main=browser"></script>
|
|
||||||
<script src="https://unpkg.com/systemjs@0.19.39/dist/system.src.js"></script>
|
|
||||||
|
|
||||||
<script src="https://cdn.rawgit.com/angular/angular.io/b3c65a9/public/docs/_examples/_boilerplate/systemjs.config.web.js"></script>
|
|
||||||
<script>
|
|
||||||
System.import('main.js').catch(function(err){ console.error(err); });
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<my-app>Loading...</my-app>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright 2016 Google Inc. All Rights Reserved.
|
|
||||||
Use of this source code is governed by an MIT-style license that
|
|
||||||
can be found in the LICENSE file at http://angular.io/license
|
|
||||||
-->"><input type="hidden" name="tags[0]" value="angular"><input type="hidden" name="tags[1]" value="example"><input type="hidden" name="private" value="true"><input type="hidden" name="description" value="Angular Example - Intro to Angular"></form><script>document.getElementById("mainForm").submit();</script></body></html>
|
|
@ -15,7 +15,7 @@ describe('Attribute directives', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to select green highlight', function () {
|
it('should be able to select green highlight', function () {
|
||||||
let highlightedEle = element(by.cssContainingText('p', 'Highlight me'));
|
let highlightedEle = element(by.cssContainingText('p', 'Highlight me!'));
|
||||||
let lightGreen = 'rgba(144, 238, 144, 1)';
|
let lightGreen = 'rgba(144, 238, 144, 1)';
|
||||||
|
|
||||||
expect(highlightedEle.getCssValue('background-color')).not.toEqual(lightGreen);
|
expect(highlightedEle.getCssValue('background-color')).not.toEqual(lightGreen);
|
||||||
|
@ -2,19 +2,13 @@
|
|||||||
<h1>My First Attribute Directive</h1>
|
<h1>My First Attribute Directive</h1>
|
||||||
<!-- #docregion applied -->
|
<!-- #docregion applied -->
|
||||||
<p myHighlight>Highlight me!</p>
|
<p myHighlight>Highlight me!</p>
|
||||||
<!-- #enddocregion applied -->
|
<!-- #enddocregion applied, -->
|
||||||
<!-- #enddocregion -->
|
|
||||||
|
|
||||||
<!-- #docregion color-1 -->
|
<!-- #docregion color-1 -->
|
||||||
<p myHighlight highlightColor="yellow">Highlighted in yellow</p>
|
<p myHighlight highlightColor="yellow">Highlighted in yellow</p>
|
||||||
<p myHighlight [highlightColor]="'orange'">Highlighted in orange</p>
|
<p myHighlight [highlightColor]="'orange'">Highlighted in orange</p>
|
||||||
|
|
||||||
<!-- #enddocregion color-1 -->
|
<!-- #enddocregion color-1 -->
|
||||||
|
|
||||||
<!-- #docregion color-2 -->
|
<!-- #docregion color-2 -->
|
||||||
<p myHighlight [highlightColor]="color">Highlighted with parent component's color</p>
|
<p myHighlight [highlightColor]="color">Highlighted with parent component's color</p>
|
||||||
<!-- #enddocregion color-2 -->
|
<!-- #enddocregion color-2 -->
|
||||||
|
|
||||||
<!-- #docregion p-style-background -->
|
|
||||||
<p [style.background]="'lime'">I am green with envy!</p>
|
|
||||||
<!-- #enddocregion p-style-background -->
|
|
@ -1,7 +1,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: './app.component.1.html'
|
templateUrl: './app.component.1.html'
|
||||||
})
|
})
|
||||||
@ -9,4 +8,3 @@ import { Component } from '@angular/core';
|
|||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
color = 'yellow';
|
color = 'yellow';
|
||||||
}
|
}
|
||||||
// #enddocregion class
|
|
@ -1,5 +1,4 @@
|
|||||||
<!-- #docregion -->
|
<!-- #docregion v2, -->
|
||||||
<!-- #docregion v2 -->
|
|
||||||
<h1>My First Attribute Directive</h1>
|
<h1>My First Attribute Directive</h1>
|
||||||
|
|
||||||
<h4>Pick a highlight color</h4>
|
<h4>Pick a highlight color</h4>
|
||||||
@ -10,15 +9,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- #docregion color -->
|
<!-- #docregion color -->
|
||||||
<p [myHighlight]="color">Highlight me!</p>
|
<p [myHighlight]="color">Highlight me!</p>
|
||||||
<!-- #enddocregion color -->
|
<!-- #enddocregion color, v2 -->
|
||||||
<!-- #enddocregion v2 -->
|
|
||||||
|
|
||||||
<!-- #docregion defaultColor -->
|
<!-- #docregion defaultColor -->
|
||||||
<p [myHighlight]="color" defaultColor="violet">
|
<p [myHighlight]="color" defaultColor="violet">
|
||||||
Highlight me too!
|
Highlight me too!
|
||||||
</p>
|
</p>
|
||||||
<!-- #enddocregion defaultColor -->
|
<!-- #enddocregion defaultColor, -->
|
||||||
<!-- #enddocregion -->
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<p><i>Mouse over the following lines to see fixed highlights</i></p>
|
<p><i>Mouse over the following lines to see fixed highlights</i></p>
|
@ -2,7 +2,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
templateUrl: './app.component.html'
|
templateUrl: './app.component.html'
|
||||||
})
|
})
|
||||||
@ -10,5 +9,3 @@ import { Component } from '@angular/core';
|
|||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
color: string;
|
color: string;
|
||||||
}
|
}
|
||||||
// #enddocregion class
|
|
||||||
// #enddocregion
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user