Compare commits
739 Commits
Author | SHA1 | Date | |
---|---|---|---|
58698d7806 | |||
e26c25a062 | |||
0a6434b066 | |||
ff3550c304 | |||
6d4a14082c | |||
9ddf269c2c | |||
25a76a1492 | |||
8439a6ec2a | |||
1ef2eae3aa | |||
d5d034a0ff | |||
5ca35b3cd2 | |||
0a6a3f3163 | |||
3a601382e6 | |||
7a1fdde69e | |||
cbc2ea1b1a | |||
bdf801b0e8 | |||
fe5e8b7177 | |||
11f0f98ad8 | |||
801b534421 | |||
0fc83215e2 | |||
3d3a1a4642 | |||
32a40ba5de | |||
045271230d | |||
ec31f6bf9a | |||
4798d77088 | |||
08c6762039 | |||
26516045e7 | |||
a83b9f7911 | |||
1b7c77e49f | |||
3ab31a4be6 | |||
43dcf77123 | |||
d4bf2da3bd | |||
fa3882845a | |||
fa59748e00 | |||
c38ecb3b5b | |||
875efa8492 | |||
74964bde99 | |||
785fb5cc5a | |||
26d9f0278b | |||
22ebd53c17 | |||
a972c039c3 | |||
f5e18029fa | |||
317c7087c5 | |||
39abe7b7c1 | |||
36a7705a44 | |||
50a21885cf | |||
e86f3d9a49 | |||
738f2961ba | |||
f2bf8287ba | |||
9d5b34e1e7 | |||
d237f4014a | |||
8743a9bfd6 | |||
514d03f2d0 | |||
48d7205873 | |||
e1c6fd5453 | |||
968f153491 | |||
1e28495c89 | |||
0bcf20c9fa | |||
cf81823b07 | |||
d4ac9698ba | |||
c205516f0d | |||
777bd412b2 | |||
1e79014fc4 | |||
d0c066a223 | |||
65e18dc1bf | |||
1ceddb6290 | |||
22731a7588 | |||
72dd10f78f | |||
c0e3852384 | |||
2cb0f68a7b | |||
8450e0ab2f | |||
e38b2b502c | |||
445b9a5627 | |||
d523630ea2 | |||
d6016f1d1d | |||
be3cca4fd5 | |||
169e9dd2c8 | |||
13f3157823 | |||
edef58f466 | |||
7c89af34a9 | |||
bd576bb83f | |||
168c2a645b | |||
7729bb2bdc | |||
426324513d | |||
4d6f467fea | |||
6b859daea4 | |||
7960d1879d | |||
f1ab394218 | |||
86203736e9 | |||
41ef75869c | |||
2b8b647006 | |||
ed1db40322 | |||
d3594fc1c5 | |||
9fd70c9715 | |||
b7bbc82e3e | |||
139f5b3672 | |||
6f8ec256ef | |||
5d7005eef5 | |||
2e724ec68b | |||
76f8f78920 | |||
6eb6ac7c12 | |||
9644873023 | |||
ae4563202c | |||
42d4287153 | |||
f9a6a175bf | |||
53a16006d6 | |||
8a986d4642 | |||
e346c3c2f2 | |||
60aeee7abf | |||
1008bb6287 | |||
8a5cd2200a | |||
f58f3dc07a | |||
bb58138579 | |||
b8f740b253 | |||
23766b85e9 | |||
3cd9645daa | |||
2d38fa104b | |||
56b3f1703e | |||
c438b5eeda | |||
70b51a6255 | |||
7ebd8e59a8 | |||
1c533c913d | |||
ead3f926cb | |||
9be222f448 | |||
b137f09345 | |||
453693fd33 | |||
270176bbe4 | |||
5840a86f98 | |||
2aab1c9dd6 | |||
f9669e50ff | |||
99a393e84f | |||
d76531d16e | |||
23dc9a90b0 | |||
0b28732d77 | |||
06a33984af | |||
ba3eb8b654 | |||
c8ad9657c9 | |||
9be8abd012 | |||
74b250b146 | |||
d8c828c9b1 | |||
97277bc9fb | |||
1821b75530 | |||
82004c76ac | |||
a663565403 | |||
85d9c20b1d | |||
80a74b450a | |||
9a6f27c34c | |||
d723a69b31 | |||
d98b1c3bc4 | |||
02b5087685 | |||
48394c64ae | |||
cde0b4b361 | |||
9f20dd937a | |||
a1b630ee8f | |||
d05d28629d | |||
ee50ee493d | |||
161ff5c79d | |||
71e0df039c | |||
0399c6972a | |||
328971ffcc | |||
4d8b8ad372 | |||
0d6b74dd87 | |||
52d11f63cf | |||
a14f25c338 | |||
0b4d85e9f1 | |||
b9e095aa31 | |||
05e3e4d71e | |||
81a9db2b0a | |||
b7823e7087 | |||
3f8ab80583 | |||
ffb9dc6cf9 | |||
86d254d386 | |||
505b54b86b | |||
a527c695aa | |||
80576641a8 | |||
50fbed8e5f | |||
7d27ecc319 | |||
03616bcb43 | |||
3a19f70d1c | |||
dc1f1295ee | |||
49df4ef454 | |||
e1146f3d06 | |||
0d5f2d3c7e | |||
a167bca927 | |||
e3709f5d48 | |||
197387d05e | |||
1089261717 | |||
ddb792da28 | |||
89203c96ad | |||
3d20c50156 | |||
dcabb05102 | |||
68814040e3 | |||
3980640d53 | |||
52d43a99ef | |||
45feb10c46 | |||
250527ca68 | |||
94076c934c | |||
f936b8cbd2 | |||
d571a51739 | |||
86b1cc7313 | |||
787c54736c | |||
19544060d3 | |||
c0e2dba07b | |||
e01b539ee5 | |||
809e8f742e | |||
00c110b055 | |||
1e74ea9e60 | |||
f62876bbcb | |||
fddd2af4fc | |||
d5a9396017 | |||
3e6a722ddb | |||
5fe1e74dd3 | |||
f974c48885 | |||
568612349f | |||
b719905f9b | |||
56a8533cf3 | |||
b72dbc843f | |||
8fe8b8fcff | |||
b6af8700ce | |||
3d52174bf1 | |||
dbdcfed2bd | |||
ffbacdf4ac | |||
7f3242affb | |||
e3064d5432 | |||
0c3738a780 | |||
0922228024 | |||
c94a2c9e3f | |||
948e2236c0 | |||
a294e0dd79 | |||
3553977bd7 | |||
1ae3f87383 | |||
4e7a44c816 | |||
d1805d04d5 | |||
d243baf48a | |||
ff84c5c4da | |||
87ddbdf919 | |||
9803cb011e | |||
13d60eac61 | |||
d876700c26 | |||
99bdd257a6 | |||
3db9d57de3 | |||
66e50f28d2 | |||
0ede987ced | |||
71100e6d72 | |||
676ec411b9 | |||
01e7ff682c | |||
34c42836cf | |||
50d4a4fe5c | |||
69510acb20 | |||
ef1c6d8c26 | |||
2ecaa40e64 | |||
fc4dc35426 | |||
104d30507a | |||
c57b491778 | |||
1dc7d0d29e | |||
39c8baea31 | |||
abed2cd52c | |||
22758912a0 | |||
bb6b59128f | |||
4258c3d1df | |||
70156bc4ed | |||
2ac2ab7ff6 | |||
ca0a55f4ee | |||
0b3d25d67e | |||
24e0c3d43d | |||
922908818f | |||
8dec381145 | |||
32da3e1602 | |||
6d68f3e39a | |||
50fb13fb09 | |||
fe8fcc834c | |||
5c0e681bf3 | |||
7d6e833a6f | |||
49e900d6fc | |||
5feb9e1935 | |||
002a5afa98 | |||
cf0968f98e | |||
855e8ad9f6 | |||
89c442270a | |||
ae9418c7de | |||
166d90d2a9 | |||
7d318743c1 | |||
2a68ba4cbb | |||
d244523ae6 | |||
941d2cdaaf | |||
7d1f9c8a7c | |||
f841e36543 | |||
f229449c67 | |||
6e20e0aac8 | |||
1e139d4339 | |||
fba3f10938 | |||
c95437f15d | |||
39c7769c9e | |||
8c51ce6f3b | |||
71b0c3d469 | |||
b8760a0ca5 | |||
50fb58fd01 | |||
fe8fe9ba9e | |||
637805a0c9 | |||
7b2b1afe71 | |||
7d3fd4d655 | |||
10da6a45c6 | |||
84272e2227 | |||
cb31381734 | |||
3e1a3b2e32 | |||
1e6a226703 | |||
b91254fc43 | |||
8b8168262d | |||
a26965812b | |||
def354de16 | |||
9782736e00 | |||
e8354edcd2 | |||
5b76f04b7f | |||
a57825acf3 | |||
efc7639352 | |||
3e26cabe02 | |||
9d114c052a | |||
43e61c25e1 | |||
4e1493a1d6 | |||
794584e353 | |||
45862d0812 | |||
f3625e424b | |||
ccbda9de65 | |||
27bc7dcb43 | |||
0f7e4fae20 | |||
a45fad3dd9 | |||
f00ae516eb | |||
6d246d6c72 | |||
7c8159b3e2 | |||
5aa12c73ae | |||
d8f7b293d7 | |||
39af314e29 | |||
8daadf360c | |||
859a3d5784 | |||
66f6a48210 | |||
8a4c577917 | |||
2b15108f7e | |||
bc4f10ca20 | |||
e6516b0229 | |||
77309e2ea4 | |||
e371b226fa | |||
ccb19fea68 | |||
38a0d1fac5 | |||
e7b392bf3a | |||
8977b9690e | |||
d4d8125b2d | |||
62443b04a0 | |||
3c1eb9413f | |||
4168c946c6 | |||
293ec78069 | |||
131d0d8e8a | |||
5fb0b567ce | |||
03f93b3772 | |||
3ccb4490a4 | |||
2ea197b99f | |||
503a524d27 | |||
a577c9e1f4 | |||
52ce9d5dcb | |||
2b49bf77af | |||
92b278c097 | |||
513f645894 | |||
0bd2d7bac6 | |||
82c5313740 | |||
c8e865ac8e | |||
d9bf6e37ae | |||
e3c54e4465 | |||
153ba4dff3 | |||
5731d0741a | |||
70ef061fa6 | |||
c2b5ebfa24 | |||
0d07d273dc | |||
131602474d | |||
282d3510cf | |||
3ed2d75336 | |||
4d55dfd9d9 | |||
86bf5f3912 | |||
dbfb6b9d45 | |||
8dd99ac550 | |||
014949f74c | |||
5e8bf2f88d | |||
ea143e7498 | |||
29eb24b142 | |||
dc4a3d00d0 | |||
8aa70c2477 | |||
49c5234c68 | |||
1b253e14ff | |||
8c1ac28275 | |||
5ef7a07c4b | |||
113556357a | |||
7983f0a69b | |||
8be6892777 | |||
9f877f4416 | |||
4664226b97 | |||
d4c66d5edb | |||
ce1543fcde | |||
a6e797b8f5 | |||
ca79e11bfa | |||
f781f741ea | |||
bd02b27ee1 | |||
e3759f7a73 | |||
7de2ba0e22 | |||
07b4c8be42 | |||
3128b26e5c | |||
4f5b01a98a | |||
c151f9cdc8 | |||
24ab0a7db0 | |||
31988a6ff9 | |||
8ac74da016 | |||
355e0b0587 | |||
d96ae123b2 | |||
7e73287676 | |||
9dd647b087 | |||
47814b4cdf | |||
700e55ce14 | |||
68d37ef0c1 | |||
acf270d724 | |||
1007d1ad27 | |||
51e9e64c5a | |||
1915e47d11 | |||
e994b11105 | |||
856ee73464 | |||
0d06c866c6 | |||
1208a35373 | |||
b415010222 | |||
d6989c80d3 | |||
81e4b2a4bf | |||
c494d3cf60 | |||
22b58a717a | |||
86b13ccf80 | |||
8db928df9d | |||
9367e91402 | |||
87b16710e7 | |||
20c463e97c | |||
57eacf4b5a | |||
d814eaad95 | |||
678fd32406 | |||
3e938279d0 | |||
d700a409da | |||
b750919ce0 | |||
9c403753e2 | |||
83a06863f9 | |||
08a18b82de | |||
255463ed48 | |||
b4bbdb4ce2 | |||
7623d74607 | |||
ccaa199366 | |||
069062236c | |||
5794506c64 | |||
cb65724761 | |||
44856bfc2f | |||
5db4f1a5ba | |||
0561b66a2b | |||
5cbcb5680b | |||
6948ef125c | |||
08f943a1f3 | |||
f69ac670ee | |||
60aa943e2d | |||
68a799e950 | |||
5f178f3a5a | |||
81c13e2f86 | |||
2d9111bfb6 | |||
a5c47d0045 | |||
7e3f8f77a9 | |||
6a663a4073 | |||
ec57133b61 | |||
3647cb7f3b | |||
49d5de68f6 | |||
4ab70fb93d | |||
5d6074eaff | |||
b86d4dee4d | |||
9add50129d | |||
9d364203a6 | |||
4247176b6e | |||
3b9c5c849c | |||
e79b845a45 | |||
b492b9e12b | |||
b99ef2b80a | |||
27d811a7ce | |||
accda00190 | |||
c25e6142d2 | |||
b96a3c8def | |||
c917e5b5bb | |||
2a78d5e6fe | |||
95074ca303 | |||
1cd9e6c2eb | |||
855d9c00e0 | |||
49d97f1ba0 | |||
62f751cd87 | |||
646b42a113 | |||
24e5c5b425 | |||
42a7295203 | |||
7c39216083 | |||
223882aeb6 | |||
aafb46a8fe | |||
c73196eb59 | |||
d6595ebd39 | |||
5b25c07795 | |||
3ed7fc6686 | |||
7c1bd7170e | |||
2e21690c66 | |||
f6f44edcc0 | |||
90bf5d8961 | |||
b87d650da2 | |||
e53179ef8c | |||
31795b620f | |||
41cd8f3efb | |||
3fd3c2ac4c | |||
1eafd04eb3 | |||
00c4751f37 | |||
c2e131119b | |||
7866684f2b | |||
6e05ae02a2 | |||
431a42a238 | |||
7a9c987e56 | |||
ae86cb3be0 | |||
a6f34be9f5 | |||
d74078fb88 | |||
ddd6124802 | |||
96a0e131bf | |||
e43d3fa4b7 | |||
7657535718 | |||
3de80fc7fb | |||
729c797890 | |||
188ff848d2 | |||
280a784fe3 | |||
4f36340de7 | |||
83bb5d1922 | |||
3e39fef274 | |||
36cc72ee5b | |||
01b5acd7cf | |||
186118e684 | |||
609e6b9787 | |||
68bf8c36c6 | |||
8216657681 | |||
13cb75da8b | |||
23a98b9e51 | |||
bd149e5d67 | |||
fb906a87e8 | |||
0bdd30e34f | |||
373fa78d7f | |||
26fbf1d13c | |||
608c3748e8 | |||
6d8c847e7b | |||
919f42fea1 | |||
1b6b936ef4 | |||
db2329ef6a | |||
de267e97c9 | |||
f8c6947205 | |||
41fea84957 | |||
a7b07defe1 | |||
6e7d071c6b | |||
99d330a1b7 | |||
3cdf5afc6e | |||
ea4321d912 | |||
88ab1d0e55 | |||
20d76374ed | |||
8ee25e6b58 | |||
43597279d6 | |||
55103419e9 | |||
547efb5f4d | |||
091b11a4ab | |||
4042a84ad6 | |||
6a24c02d73 | |||
b7c417f618 | |||
313bdce590 | |||
5cf82f8f3f | |||
e5e5c24d48 | |||
1d378e2987 | |||
017d67cdf8 | |||
83631b28cb | |||
d4b6c41a5f | |||
66b2d78305 | |||
67b8d57a8d | |||
02acb5e3e5 | |||
a2e8b3a6a8 | |||
d4b8b24406 | |||
cfde36da84 | |||
d889f57ae2 | |||
816bc8af17 | |||
d2a86872a9 | |||
474dbf09ec | |||
e129b18d17 | |||
8a27a034c4 | |||
4ecae6449e | |||
5e307d5ba7 | |||
089fe83865 | |||
b1cda3639f | |||
c4221dad11 | |||
fe3679a356 | |||
72eab4d254 | |||
db2d67cc00 | |||
117c7eebc3 | |||
89f64e58c3 | |||
553a680817 | |||
858e48a794 | |||
e942d8b681 | |||
f1e4a153f0 | |||
e0ed59e55f | |||
d6b1466c81 | |||
d1abf4e897 | |||
08e7efc69e | |||
46674d5fac | |||
c5ca5c0d9f | |||
61170856ee | |||
a800ccd922 | |||
971e78dc35 | |||
b0eca85e51 | |||
d01ec03f54 | |||
9e2d87f5b8 | |||
fc034270ce | |||
77ff72f93b | |||
44095d95c9 | |||
e3518967ad | |||
005dc8f68b | |||
7e9649bdf1 | |||
e3e15773ee | |||
b25e15c317 | |||
3b067c8579 | |||
57cf5509e6 | |||
3f20a5c7c8 | |||
14d8a98001 | |||
5cb36ed706 | |||
490e39a23f | |||
33c1c1df36 | |||
d8d4f654a6 | |||
2c4850dc58 | |||
2ef4760ff7 | |||
52f0e3cc3b | |||
61265b42ef | |||
6601d0f7ba | |||
cccc328a52 | |||
65211f46cf | |||
da9ff255dd | |||
2cf6244b1d | |||
b45fa5e263 | |||
d7ed9c9e9e | |||
266d97de95 | |||
d71329d55c | |||
7ba26b140b | |||
297723d0bc | |||
bb07fbde76 | |||
d7e8d15578 | |||
bfad6b4fa1 | |||
fd9d1888ce | |||
94fbe3b5ac | |||
56828e43b6 | |||
c5cfc3a1b6 | |||
b76f5a6a7d | |||
fb41b7dc30 | |||
ca1019a950 | |||
9ebf0c8e5e | |||
8062f7de9e | |||
cc6c4346c2 | |||
4cb46ce10c | |||
7ef9d4a582 | |||
a522bb9f03 | |||
31b96e99ff | |||
b7a6e1fef7 | |||
84b4593d01 | |||
0c6dc45c85 | |||
5b96078624 | |||
1a44a0b4a8 | |||
b1f040f5a2 | |||
eb031c6ff1 | |||
b4c252bcc5 | |||
db77d8dc92 | |||
ab5bc42da0 | |||
f567e1898f | |||
8d0ee34939 | |||
43a49d3f64 | |||
811a7f2863 | |||
9ed5fb6d2c | |||
e1c4930a1a | |||
dab5df9734 | |||
b1d03fe70b | |||
06c0d9666f | |||
1c9200eca8 | |||
ace6440460 | |||
b26ac1c22f | |||
60e5507076 | |||
4cfa571258 | |||
999ab0a690 | |||
ba47997715 | |||
a35bf114eb | |||
6761a64522 | |||
0b47902ad7 | |||
4662878a1f | |||
ca776c59dd | |||
f2563ca800 | |||
9757347e71 | |||
a19e018439 | |||
6ff164be0e | |||
84f024309a | |||
c6b206ee4b | |||
1d1e75ee2b | |||
acf6781ccc | |||
fd48e53986 | |||
fe312ccb4c | |||
764f471dc0 | |||
8b02c0e769 | |||
5a2ee7a6f5 | |||
529d4fc9ee | |||
fac7dde5b1 | |||
1f005908a4 | |||
2278fe8f0e | |||
aad3444a58 | |||
44377adbcc | |||
b28b3acb83 | |||
7493435911 | |||
937f7cea37 | |||
7d1990e4d1 | |||
76f8ae31ad | |||
103846a51d | |||
0a536af093 | |||
4f29287399 | |||
62e6c1f43a | |||
c3c513ed9e | |||
ed495bc9f1 | |||
a3de5f8f20 | |||
2491b7249a | |||
a851ba3781 | |||
0468a649af | |||
47d3acdc49 | |||
acbfb9eb4d | |||
d35f84a167 | |||
87e9f333d4 | |||
08fc4f3ad8 | |||
c6c79ab5dc | |||
6837491f08 | |||
fc5af69fb2 | |||
81ccb718b1 | |||
0c56dfadef | |||
7be7abdebd | |||
5a1ddee88c | |||
99f8e10809 | |||
d665d9a18c | |||
8b2101be9f | |||
0d56cee9e1 | |||
7f612fc828 |
19
.circleci/README.md
Normal file
19
.circleci/README.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Encryption
|
||||||
|
|
||||||
|
Based on https://github.com/circleci/encrypted-files
|
||||||
|
|
||||||
|
In the CircleCI web UI, we have a secret variable called `KEY`
|
||||||
|
https://circleci.com/gh/angular/angular/edit#env-vars
|
||||||
|
which is only exposed to non-fork builds
|
||||||
|
(see "Pass secrets to builds from forked pull requests" under
|
||||||
|
https://circleci.com/gh/angular/angular/edit#advanced-settings)
|
||||||
|
|
||||||
|
We use this as a symmetric AES encryption key to encrypt tokens like
|
||||||
|
a GitHub token that enables publishing snapshots.
|
||||||
|
|
||||||
|
To create the github_token file, we take this approach:
|
||||||
|
- Find the angular-builds:token in http://valentine
|
||||||
|
- Go inside the ngcontainer docker image so you use the same version of openssl as we will at runtime: `docker run --rm -it angular/ngcontainer`
|
||||||
|
- echo "https://[token]:@github.com" > credentials
|
||||||
|
- openssl aes-256-cbc -e -in credentials -out .circleci/github_token -k $KEY
|
||||||
|
- If needed, base64-encode the result so you can copy-paste it out of docker: `base64 github_token`
|
@ -3,7 +3,10 @@
|
|||||||
# See remote cache documentation in /docs/BAZEL.md
|
# See remote cache documentation in /docs/BAZEL.md
|
||||||
|
|
||||||
# Don't be spammy in the logs
|
# Don't be spammy in the logs
|
||||||
build --noshow_progress
|
# TODO(gmagolan): Hide progress again once build performance improves
|
||||||
|
# Presently, CircleCI can timeout during bazel test ... with the following
|
||||||
|
# error: Too long with no output (exceeded 10m0s)
|
||||||
|
# build --noshow_progress
|
||||||
|
|
||||||
# Don't run manual tests
|
# Don't run manual tests
|
||||||
test --test_tag_filters=-manual
|
test --test_tag_filters=-manual
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
## IMPORTANT
|
## IMPORTANT
|
||||||
# If you change the `docker_image` version, also change the `cache_key` suffix and the version of
|
# If you change the `docker_image` version, also change the `cache_key` suffix and the version of
|
||||||
# `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file.
|
# `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file.
|
||||||
var_1: &docker_image angular/ngcontainer:0.2.0
|
var_1: &docker_image angular/ngcontainer:0.3.3
|
||||||
var_2: &cache_key v2-angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.2.0
|
var_2: &cache_key v2-angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.3.3
|
||||||
|
|
||||||
# Define common ENV vars
|
# Define common ENV vars
|
||||||
var_3: &define_env_vars
|
var_3: &define_env_vars
|
||||||
@ -63,7 +63,7 @@ jobs:
|
|||||||
- run: yarn install --frozen-lockfile --non-interactive
|
- run: yarn install --frozen-lockfile --non-interactive
|
||||||
- run: ./node_modules/.bin/gulp lint
|
- run: ./node_modules/.bin/gulp lint
|
||||||
|
|
||||||
build:
|
test:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
steps:
|
steps:
|
||||||
@ -80,37 +80,152 @@ jobs:
|
|||||||
|
|
||||||
- run: ls /home/circleci/bazel_repository_cache || true
|
- run: ls /home/circleci/bazel_repository_cache || true
|
||||||
- run: bazel info release
|
- run: bazel info release
|
||||||
- run: bazel run @yarn//:yarn
|
- run: bazel run @nodejs//:yarn
|
||||||
# Use bazel query so that we explicitly ask for all buildable targets to be built as well
|
# Use bazel query so that we explicitly ask for all buildable targets to be built as well
|
||||||
# This avoids waiting for the slowest build target to finish before running the first test
|
# This avoids waiting for the slowest build target to finish before running the first test
|
||||||
# See https://github.com/bazelbuild/bazel/issues/4257
|
# See https://github.com/bazelbuild/bazel/issues/4257
|
||||||
# NOTE: Angular developers should typically just bazel build //packages/... or bazel test //packages/...
|
# NOTE: Angular developers should typically just bazel build //packages/... or bazel test //packages/...
|
||||||
- run: bazel query --output=label //... | xargs bazel test
|
- run: bazel query --output=label //... | xargs bazel test --build_tag_filters=-ivy-only --test_tag_filters=-manual,-ivy-only
|
||||||
|
|
||||||
# We run the integration tests outside of Bazel for now.
|
|
||||||
# See comments inside this script.
|
|
||||||
- run: xvfb-run --auto-servernum ./integration/run_tests.sh
|
|
||||||
|
|
||||||
# CircleCI will allow us to go back and view/download these artifacts from past builds.
|
# CircleCI will allow us to go back and view/download these artifacts from past builds.
|
||||||
# Also we can use a service like https://buildsize.org/ to automatically track binary size of these artifacts.
|
# Also we can use a service like https://buildsize.org/ to automatically track binary size of these artifacts.
|
||||||
|
# The destination keys need be format {projectName}/{context}/{fileName} so that the github-robot can process them for size calculations
|
||||||
|
# projectName should remain consistant to group files
|
||||||
|
# context and fileName can be almost anything (within usual URI rules)
|
||||||
|
# There should only be exactly 2 forward slashes in the path
|
||||||
|
# This is so they're backwards compatiable with the existing data we have on bundle sizes
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js
|
path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js
|
||||||
destination: packages/core/test/bundling/hello_world/bundle.min.js
|
destination: core/hello_world/bundle
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js
|
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js
|
||||||
destination: packages/core/test/bundling/todo/bundle.min.js
|
destination: core/todo/bundle
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js.brotli
|
path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js.br
|
||||||
destination: packages/core/test/bundling/hello_world/bundle.min.js.brotli
|
destination: core/hello_world/bundle.br
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.brotli
|
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.br
|
||||||
destination: packages/core/test/bundling/todo/bundle.min.js.brotli
|
destination: core/todo/bundle.br
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: *cache_key
|
key: *cache_key
|
||||||
paths:
|
paths:
|
||||||
- "node_modules"
|
- "node_modules"
|
||||||
- "~/bazel_repository_cache"
|
- "~/bazel_repository_cache"
|
||||||
|
# Temporary job to test what will happen when we flip the Ivy flag to true
|
||||||
|
test_ivy_jit:
|
||||||
|
<<: *job_defaults
|
||||||
|
resource_class: xlarge
|
||||||
|
steps:
|
||||||
|
- *define_env_vars
|
||||||
|
- checkout:
|
||||||
|
<<: *post_checkout
|
||||||
|
# See remote cache documentation in /docs/BAZEL.md
|
||||||
|
- run: .circleci/setup_cache.sh
|
||||||
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
||||||
|
- *setup-bazel-remote-cache
|
||||||
|
|
||||||
|
- restore_cache:
|
||||||
|
key: *cache_key
|
||||||
|
|
||||||
|
- run: bazel run @yarn//:yarn
|
||||||
|
- run: bazel query --output=label //... | xargs bazel test --define=compile=jit --build_tag_filters=ivy-jit --test_tag_filters=-manual,ivy-jit
|
||||||
|
|
||||||
|
test_ivy_aot:
|
||||||
|
<<: *job_defaults
|
||||||
|
resource_class: xlarge
|
||||||
|
steps:
|
||||||
|
- *define_env_vars
|
||||||
|
- checkout:
|
||||||
|
<<: *post_checkout
|
||||||
|
# See remote cache documentation in /docs/BAZEL.md
|
||||||
|
- run: .circleci/setup_cache.sh
|
||||||
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
||||||
|
- *setup-bazel-remote-cache
|
||||||
|
|
||||||
|
- restore_cache:
|
||||||
|
key: *cache_key
|
||||||
|
|
||||||
|
- run: bazel run @yarn//:yarn
|
||||||
|
- run: bazel query --output=label //... | xargs bazel test --define=compile=local --build_tag_filters=ivy-local --test_tag_filters=-manual,ivy-local
|
||||||
|
|
||||||
|
# This job exists only for backwards-compatibility with old scripts and tests
|
||||||
|
# that rely on the pre-Bazel dist/packages-dist layout.
|
||||||
|
# It duplicates some work with the job above: we build the bazel packages
|
||||||
|
# twice. Even though we have a remote cache, these jobs will typically run in
|
||||||
|
# parallel so up-to-date outputs will not be available at the time the build
|
||||||
|
# starts.
|
||||||
|
# No new jobs should depend on this one.
|
||||||
|
build-packages-dist:
|
||||||
|
<<: *job_defaults
|
||||||
|
resource_class: xlarge
|
||||||
|
steps:
|
||||||
|
- *define_env_vars
|
||||||
|
- checkout:
|
||||||
|
<<: *post_checkout
|
||||||
|
# See remote cache documentation in /docs/BAZEL.md
|
||||||
|
- run: .circleci/setup_cache.sh
|
||||||
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
||||||
|
- *setup-bazel-remote-cache
|
||||||
|
|
||||||
|
- run: bazel run @nodejs//:yarn
|
||||||
|
- run: scripts/build-packages-dist.sh
|
||||||
|
|
||||||
|
# Save the npm packages from //packages/... for other workflow jobs to read
|
||||||
|
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: dist
|
||||||
|
paths:
|
||||||
|
- packages-dist
|
||||||
|
- packages-dist-ivy-jit
|
||||||
|
- packages-dist-ivy-local
|
||||||
|
|
||||||
|
# We run the integration tests outside of Bazel for now.
|
||||||
|
# They are a separate workflow job so that they can be easily re-run.
|
||||||
|
# When the tests are ported to bazel test targets, they should move to the "test"
|
||||||
|
# job above, as part of the bazel test command. That has flaky_test_attempts so the
|
||||||
|
# need to re-run manually should be alleviated.
|
||||||
|
# See comments inside the integration/run_tests.sh script.
|
||||||
|
integration_test:
|
||||||
|
<<: *job_defaults
|
||||||
|
# Note: we run Bazel in one of the integration tests, and it can consume >2G
|
||||||
|
# of memory. Together with the system under test, this can exhaust the RAM
|
||||||
|
# on a 4G worker so we use a larger machine here too.
|
||||||
|
resource_class: xlarge
|
||||||
|
steps:
|
||||||
|
- *define_env_vars
|
||||||
|
- checkout:
|
||||||
|
<<: *post_checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: dist
|
||||||
|
- run: xvfb-run --auto-servernum ./integration/run_tests.sh
|
||||||
|
|
||||||
|
# This job updates the content of repos like github.com/angular/core-builds
|
||||||
|
# for every green build on angular/angular.
|
||||||
|
publish_snapshot:
|
||||||
|
<<: *job_defaults
|
||||||
|
steps:
|
||||||
|
# See below - ideally this job should not trigger for non-upstream builds.
|
||||||
|
# But since it does, we have to check this condition.
|
||||||
|
- run:
|
||||||
|
name: Skip this job for Pull Requests and Fork builds
|
||||||
|
# Note, `|| true` on the end makes this step always exit 0
|
||||||
|
command: '[[
|
||||||
|
-v CIRCLE_PR_NUMBER
|
||||||
|
|| "$CIRCLE_PROJECT_USERNAME" != "angular"
|
||||||
|
|| "$CIRCLE_PROJECT_REPONAME" != "angular"
|
||||||
|
]] && circleci step halt || true'
|
||||||
|
- checkout:
|
||||||
|
<<: *post_checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: dist
|
||||||
|
# CircleCI has a config setting to force SSH for all github connections
|
||||||
|
# This is not compatible with our mechanism of using a Personal Access Token
|
||||||
|
# Clear the global setting
|
||||||
|
- run: git config --global --unset "url.ssh://git@github.com.insteadof"
|
||||||
|
- run:
|
||||||
|
name: Decrypt github credentials
|
||||||
|
command: 'openssl aes-256-cbc -d -in .circleci/github_token -k "${KEY}" -out ~/.git_credentials'
|
||||||
|
- run: ./scripts/ci/publish-build-artifacts.sh
|
||||||
|
|
||||||
aio_monitoring:
|
aio_monitoring:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
@ -126,7 +241,28 @@ workflows:
|
|||||||
default_workflow:
|
default_workflow:
|
||||||
jobs:
|
jobs:
|
||||||
- lint
|
- lint
|
||||||
- build
|
- test
|
||||||
|
- test_ivy_jit
|
||||||
|
- test_ivy_aot
|
||||||
|
- build-packages-dist
|
||||||
|
- integration_test:
|
||||||
|
requires:
|
||||||
|
- build-packages-dist
|
||||||
|
- publish_snapshot:
|
||||||
|
# Note: no filters on this job because we want it to run for all upstream branches
|
||||||
|
# We'd really like to filter out pull requests here, but not yet available:
|
||||||
|
# https://discuss.circleci.com/t/workflows-pull-request-filter/14396/4
|
||||||
|
# Instead, the job just exits immediately at the first step.
|
||||||
|
requires:
|
||||||
|
# Only publish if tests and integration tests pass
|
||||||
|
- test
|
||||||
|
- test_ivy_jit
|
||||||
|
- test_ivy_aot
|
||||||
|
- integration_test
|
||||||
|
# Get the artifacts to publish from the build-packages-dist job
|
||||||
|
# since the publishing script expects the legacy outputs layout.
|
||||||
|
- build-packages-dist
|
||||||
|
|
||||||
aio_monitoring:
|
aio_monitoring:
|
||||||
jobs:
|
jobs:
|
||||||
- aio_monitoring
|
- aio_monitoring
|
||||||
|
BIN
.circleci/github_token
Normal file
BIN
.circleci/github_token
Normal file
Binary file not shown.
11
.github/angular-robot.yml
vendored
11
.github/angular-robot.yml
vendored
@ -1,5 +1,14 @@
|
|||||||
# Configuration for angular-robot
|
# Configuration for angular-robot
|
||||||
|
|
||||||
|
#options for the size plugin
|
||||||
|
size:
|
||||||
|
disabled: false
|
||||||
|
maxSizeIncrease: 1000
|
||||||
|
circleCiStatusName: "ci/circleci: build-packages-dist"
|
||||||
|
status:
|
||||||
|
disabled: false
|
||||||
|
context: "ci/angular: size"
|
||||||
|
|
||||||
# options for the merge plugin
|
# options for the merge plugin
|
||||||
merge:
|
merge:
|
||||||
# the status will be added to your pull requests
|
# the status will be added to your pull requests
|
||||||
@ -36,10 +45,12 @@ merge:
|
|||||||
- "packages/language-service/**"
|
- "packages/language-service/**"
|
||||||
- "**/.gitignore"
|
- "**/.gitignore"
|
||||||
- "**/.gitkeep"
|
- "**/.gitkeep"
|
||||||
|
- "**/package.json"
|
||||||
- "**/tsconfig-build.json"
|
- "**/tsconfig-build.json"
|
||||||
- "**/tsconfig.json"
|
- "**/tsconfig.json"
|
||||||
- "**/rollup.config.js"
|
- "**/rollup.config.js"
|
||||||
- "**/BUILD.bazel"
|
- "**/BUILD.bazel"
|
||||||
|
- "packages/**/integrationtest/**"
|
||||||
- "packages/**/test/**"
|
- "packages/**/test/**"
|
||||||
|
|
||||||
# comment that will be added to a PR when there is a conflict, leave empty or set to false to disable
|
# comment that will be added to a PR when there is a conflict, leave empty or set to false to disable
|
||||||
|
211
.pullapprove.yml
211
.pullapprove.yml
@ -8,21 +8,22 @@
|
|||||||
# alexeagle - Alex Eagle
|
# alexeagle - Alex Eagle
|
||||||
# alxhub - Alex Rickabaugh
|
# alxhub - Alex Rickabaugh
|
||||||
# andrewseguin - Andrew Seguin
|
# andrewseguin - Andrew Seguin
|
||||||
|
# benlesh - Ben Lesh
|
||||||
|
# brandonroberts - Brandon Roberts
|
||||||
# brocco - Mike Brocchi
|
# brocco - Mike Brocchi
|
||||||
# chuckjaz - Chuck Jazdzewski
|
|
||||||
# filipesilva - Filipe Silva
|
# filipesilva - Filipe Silva
|
||||||
# gkalpak - George Kalpakas
|
# gkalpak - George Kalpakas
|
||||||
# hansl - Hans Larsen
|
# hansl - Hans Larsen
|
||||||
# IgorMinar - Igor Minar
|
# IgorMinar - Igor Minar
|
||||||
# jasonaden - Jason Aden
|
# jasonaden - Jason Aden
|
||||||
# kapunahelewong - Kapunahele Wong
|
# jenniferfell - Jennifer Fell
|
||||||
# kara - Kara Erickson
|
# kara - Kara Erickson
|
||||||
|
# kyliau - Keen Yee Liau
|
||||||
# matsko - Matias Niemelä
|
# matsko - Matias Niemelä
|
||||||
# mhevery - Misko Hevery
|
# mhevery - Misko Hevery
|
||||||
# petebacondarwin - Pete Bacon Darwin
|
# petebacondarwin - Pete Bacon Darwin
|
||||||
# pkozlowski-opensource - Pawel Kozlowski
|
# pkozlowski-opensource - Pawel Kozlowski
|
||||||
# robwormald - Rob Wormald
|
# robwormald - Rob Wormald
|
||||||
# tinayuangao - Tina Gao
|
|
||||||
# vicb - Victor Berchet
|
# vicb - Victor Berchet
|
||||||
# vikerman - Vikram Subramanian
|
# vikerman - Vikram Subramanian
|
||||||
|
|
||||||
@ -91,9 +92,10 @@ groups:
|
|||||||
- "*.bzl"
|
- "*.bzl"
|
||||||
- "packages/bazel/*"
|
- "packages/bazel/*"
|
||||||
- "tools/bazel.rc"
|
- "tools/bazel.rc"
|
||||||
|
- "/docs/BAZEL.md"
|
||||||
users:
|
users:
|
||||||
- alexeagle #primary
|
- alexeagle #primary
|
||||||
- chuckjaz
|
- kyliau
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery
|
- mhevery
|
||||||
- vikerman #fallback
|
- vikerman #fallback
|
||||||
@ -130,42 +132,113 @@ groups:
|
|||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/core/*"
|
- "packages/core/*"
|
||||||
|
- "aio/content/guide/bootstrapping.md"
|
||||||
|
- "aio/content/examples/bootstrapping/*"
|
||||||
|
- "aio/content/guide/attribute-directives.md"
|
||||||
|
- "aio/content/examples/attribute-directives/*"
|
||||||
|
- "aio/content/images/guide/attribute-directives/*"
|
||||||
|
- "aio/content/guide/structural-directives.md"
|
||||||
|
- "aio/content/examples/structural-directives/*"
|
||||||
|
- "aio/content/images/guide/structural-directives/*"
|
||||||
|
- "aio/content/guide/dynamic-component-loader.md"
|
||||||
|
- "aio/content/examples/dynamic-component-loader/*"
|
||||||
|
- "aio/content/images/guide/dynamic-component-loader/*"
|
||||||
|
- "aio/content/guide/template-syntax.md"
|
||||||
|
- "aio/content/examples/template-syntax/*"
|
||||||
|
- "aio/content/images/guide/template-syntax/*"
|
||||||
|
- "aio/content/guide/dependency-injection.md"
|
||||||
|
- "aio/content/examples/dependency-injection/*"
|
||||||
|
- "aio/content/images/guide/dependency-injection/*"
|
||||||
|
- "aio/content/guide/dependency-injection-in-action.md"
|
||||||
|
- "aio/content/examples/dependency-injection-in-action/*"
|
||||||
|
- "aio/content/images/guide/dependency-injection-in-action/*"
|
||||||
|
- "aio/content/guide/hierarchical-dependency-injection.md"
|
||||||
|
- "aio/content/examples/hierarchical-dependency-injection/*"
|
||||||
|
- "aio/content/guide/singleton-services.md"
|
||||||
|
- "aio/content/guide/dependency-injection-pattern.md"
|
||||||
|
- "aio/content/guide/providers.md"
|
||||||
|
- "aio/content/examples/providers/*"
|
||||||
|
- "aio/content/guide/component-interaction.md"
|
||||||
|
- "aio/content/examples/component-interaction/*"
|
||||||
|
- "aio/content/images/guide/component-interaction/*"
|
||||||
|
- "aio/content/guide/component-styles.md"
|
||||||
|
- "aio/content/examples/component-styles/*"
|
||||||
|
- "aio/content/guide/lifecycle-hooks.md"
|
||||||
|
- "aio/content/examples/lifecycle-hooks/*"
|
||||||
|
- "aio/content/images/guide/lifecycle-hooks/*"
|
||||||
|
- "aio/content/examples/ngcontainer/*"
|
||||||
|
- "aio/content/images/guide/ngcontainer/*"
|
||||||
|
- "aio/content/guide/pipes.md"
|
||||||
|
- "aio/content/examples/pipes/*"
|
||||||
|
- "aio/content/images/guide/pipes/*"
|
||||||
|
- "aio/content/guide/entry-components.md"
|
||||||
|
- "aio/content/guide/set-document-title.md"
|
||||||
|
- "aio/content/examples/set-document-title/*"
|
||||||
|
- "aio/content/images/guide/set-document-title/*"
|
||||||
|
- "aio/content/guide/ngmodules.md"
|
||||||
|
- "aio/content/examples/ngmodules/*"
|
||||||
|
- "aio/content/examples/ngmodule/*"
|
||||||
|
- "aio/content/images/guide/ngmodule/*"
|
||||||
|
- "aio/content/guide/ngmodule-faq.md"
|
||||||
|
- "aio/content/examples/ngmodule-faq/*"
|
||||||
|
- "aio/content/guide/module-types.md"
|
||||||
|
- "aio/content/guide/sharing-ngmodules.md"
|
||||||
|
- "aio/content/guide/frequent-ngmodules.md"
|
||||||
|
- "aio/content/images/guide/frequent-ngmodules/*"
|
||||||
|
- "aio/content/guide/ngmodule-api.md"
|
||||||
|
- "aio/content/guide/ngmodule-vs-jsmodule.md"
|
||||||
|
- "aio/content/guide/feature-modules.md"
|
||||||
|
- "aio/content/examples/feature-modules/*"
|
||||||
|
- "aio/content/images/guide/feature-modules/*"
|
||||||
|
- "aio/content/guide/lazy-loading-ngmodules.md"
|
||||||
|
- "aio/content/examples/lazy-loading-ngmodules/*"
|
||||||
|
- "aio/content/images/guide/lazy-loading-ngmodules"
|
||||||
users:
|
users:
|
||||||
- mhevery #primary
|
- mhevery #primary
|
||||||
- chuckjaz
|
- jasonaden
|
||||||
- kara
|
- kara
|
||||||
- vicb
|
- vicb
|
||||||
- IgorMinar #fallback
|
- IgorMinar
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
animations:
|
animations:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/animations/*"
|
- "packages/animations/*"
|
||||||
- "packages/platform-browser/animations/*"
|
- "packages/platform-browser/animations/*"
|
||||||
|
- "aio/content/guide/animations.md"
|
||||||
|
- "aio/content/examples/animations/*"
|
||||||
|
- "aio/content/images/guide/animations/*"
|
||||||
users:
|
users:
|
||||||
- matsko #primary
|
- matsko #primary
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
compiler/i18n:
|
compiler/i18n:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/compiler/src/i18n/*"
|
- "packages/compiler/src/i18n/*"
|
||||||
|
- "aio/content/guide/i18n.md"
|
||||||
|
- "aio/content/examples/i18n/*"
|
||||||
users:
|
users:
|
||||||
- vicb #primary
|
- vicb #primary
|
||||||
- chuckjaz
|
- alxhub
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
compiler:
|
compiler:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/compiler/*"
|
- "packages/compiler/*"
|
||||||
|
- "aio/content/guide/aot-compiler.md"
|
||||||
users:
|
users:
|
||||||
- chuckjaz #primary
|
- alxhub #primary
|
||||||
- vicb
|
- vicb
|
||||||
- mhevery
|
- mhevery
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
compiler-cli/ngtools:
|
compiler-cli/ngtools:
|
||||||
conditions:
|
conditions:
|
||||||
@ -174,7 +247,6 @@ groups:
|
|||||||
users:
|
users:
|
||||||
- hansl
|
- hansl
|
||||||
- filipesilva #fallback
|
- filipesilva #fallback
|
||||||
- brocco #fallback
|
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
|
|
||||||
compiler-cli:
|
compiler-cli:
|
||||||
@ -187,7 +259,7 @@ groups:
|
|||||||
- "packages/compiler-cli/src/ngtools*"
|
- "packages/compiler-cli/src/ngtools*"
|
||||||
users:
|
users:
|
||||||
- alexeagle
|
- alexeagle
|
||||||
- chuckjaz
|
- alxhub
|
||||||
- vicb
|
- vicb
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
@ -210,57 +282,97 @@ groups:
|
|||||||
files:
|
files:
|
||||||
- "packages/forms/*"
|
- "packages/forms/*"
|
||||||
- "aio/content/guide/forms.md"
|
- "aio/content/guide/forms.md"
|
||||||
- "aio/content/guide/form-validation.md"
|
|
||||||
- "aio/content/guide/reactive-forms.md"
|
|
||||||
- "aio/content/examples/forms/*"
|
- "aio/content/examples/forms/*"
|
||||||
|
- "aio/content/images/guide/forms/*"
|
||||||
|
- "aio/content/guide/form-validation.md"
|
||||||
- "aio/content/examples/form-validation/*"
|
- "aio/content/examples/form-validation/*"
|
||||||
|
- "aio/content/images/guide/form-validation/*"
|
||||||
|
- "aio/content/guide/dynamic-form.md"
|
||||||
|
- "aio/content/examples/dynamic-form/*"
|
||||||
|
- "aio/content/images/guide/dynamic-form/*"
|
||||||
|
- "aio/content/guide/reactive-forms.md"
|
||||||
- "aio/content/examples/reactive-forms/*"
|
- "aio/content/examples/reactive-forms/*"
|
||||||
|
- "aio/content/images/guide/reactive-forms/*"
|
||||||
users:
|
users:
|
||||||
- kara #primary
|
- kara #primary
|
||||||
- tinayuangao #secondary
|
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
http:
|
http:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/common/http/*"
|
- "packages/common/http/*"
|
||||||
- "packages/http/*"
|
- "packages/http/*"
|
||||||
|
- "aio/content/guide/http.md"
|
||||||
|
- "aio/content/examples/http/*"
|
||||||
|
- "aio/content/images/guide/http/*"
|
||||||
users:
|
users:
|
||||||
- alxhub #primary
|
- alxhub #primary
|
||||||
- IgorMinar
|
- IgorMinar
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
language-service:
|
language-service:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/language-service/*"
|
- "packages/language-service/*"
|
||||||
|
- "aio/content/guide/language-service.md"
|
||||||
|
- "aio/content/images/guide/language-service/*"
|
||||||
users:
|
users:
|
||||||
- chuckjaz #primary
|
- kyliau #primary
|
||||||
# needs secondary
|
# needs secondary
|
||||||
- vicb
|
- vicb
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
router:
|
router:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/router/*"
|
- "packages/router/*"
|
||||||
|
- "aio/content/guide/router.md"
|
||||||
|
- "aio/content/examples/router/*"
|
||||||
|
- "aio/content/images/guide/router/*"
|
||||||
users:
|
users:
|
||||||
- jasonaden #primary
|
- jasonaden #primary
|
||||||
- vicb
|
- vicb
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
|
testing:
|
||||||
|
conditions:
|
||||||
|
files:
|
||||||
|
- "*/testing/*"
|
||||||
|
- "aio/content/guide/testing.md"
|
||||||
|
- "aio/content/examples/testing/*"
|
||||||
|
- "aio/content/images/guide/testing/*"
|
||||||
|
users:
|
||||||
|
- vikerman
|
||||||
|
- IgorMinar #fallback
|
||||||
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
upgrade:
|
upgrade:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/upgrade/*"
|
- "packages/upgrade/*"
|
||||||
|
- "aio/content/guide/upgrade.md"
|
||||||
|
- "aio/content/examples/upgrade-module/*"
|
||||||
|
- "aio/content/images/guide/upgrade/*"
|
||||||
|
- "aio/content/examples/upgrade-phonecat-1-typescript/*"
|
||||||
|
- "aio/content/examples/upgrade-phonecat-2-hybrid/*"
|
||||||
|
- "aio/content/examples/upgrade-phonecat-3-final/*"
|
||||||
|
- "aio/content/guide/upgrade-performance.md"
|
||||||
|
- "aio/content/guide/ajs-quick-reference.md"
|
||||||
|
- "aio/content/examples/ajs-quick-reference/*"
|
||||||
users:
|
users:
|
||||||
- petebacondarwin #primary
|
- petebacondarwin #primary
|
||||||
- gkalpak
|
- gkalpak
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
platform-browser:
|
platform-browser:
|
||||||
conditions:
|
conditions:
|
||||||
@ -276,12 +388,15 @@ groups:
|
|||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/platform-server/*"
|
- "packages/platform-server/*"
|
||||||
|
- "aio/content/guide/universal.md"
|
||||||
|
- "aio/content/examples/universal/*"
|
||||||
users:
|
users:
|
||||||
- vikerman #primary
|
- vikerman #primary
|
||||||
- alxhub #secondary
|
- alxhub #secondary
|
||||||
- vicb
|
- vicb
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
platform-webworker:
|
platform-webworker:
|
||||||
conditions:
|
conditions:
|
||||||
@ -297,22 +412,34 @@ groups:
|
|||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/service-worker/*"
|
- "packages/service-worker/*"
|
||||||
|
- "aio/content/guide/service-worker-getting-started.md"
|
||||||
|
- "aio/content/examples/service-worker-getting-started/*"
|
||||||
|
- "aio/content/guide/service-worker-communications.md"
|
||||||
|
- "aio/content/guide/service-worker-config.md"
|
||||||
|
- "aio/content/guide/service-worker-devops.md"
|
||||||
|
- "aio/content/guide/service-worker-intro.md"
|
||||||
|
- "aio/content/images/guide/service-worker/*"
|
||||||
users:
|
users:
|
||||||
- alxhub #primary
|
- gkalpak #primary
|
||||||
- gkalpak
|
- alxhub
|
||||||
- IgorMinar #fallback
|
- IgorMinar
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
elements:
|
elements:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
- "packages/elements/*"
|
- "packages/elements/*"
|
||||||
|
- "aio/content/examples/elements/*"
|
||||||
|
- "aio/content/images/guide/elements/*"
|
||||||
|
- "aio/content/guide/elements.md"
|
||||||
users:
|
users:
|
||||||
- andrewseguin #primary
|
- andrewseguin #primary
|
||||||
- gkalpak
|
- gkalpak
|
||||||
- robwormald
|
- robwormald
|
||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
benchpress:
|
benchpress:
|
||||||
conditions:
|
conditions:
|
||||||
@ -324,7 +451,7 @@ groups:
|
|||||||
- IgorMinar #fallback
|
- IgorMinar #fallback
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
|
||||||
angular.io:
|
docs-infra:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
include:
|
include:
|
||||||
@ -337,7 +464,7 @@ groups:
|
|||||||
- gkalpak
|
- gkalpak
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
|
||||||
angular.io-guide-and-tutorial:
|
docs/guide-and-tutorial:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
include:
|
include:
|
||||||
@ -347,18 +474,20 @@ groups:
|
|||||||
- "aio/content/navigation.json"
|
- "aio/content/navigation.json"
|
||||||
- "aio/content/license.md"
|
- "aio/content/license.md"
|
||||||
users:
|
users:
|
||||||
- kapunahelewong
|
|
||||||
- stephenfluin
|
- stephenfluin
|
||||||
|
- jenniferfell
|
||||||
|
- brandonroberts
|
||||||
- petebacondarwin
|
- petebacondarwin
|
||||||
- gkalpak
|
- gkalpak
|
||||||
- IgorMinar
|
- IgorMinar
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
|
||||||
angular.io-marketing:
|
docs/marketing:
|
||||||
conditions:
|
conditions:
|
||||||
files:
|
files:
|
||||||
include:
|
include:
|
||||||
- "aio/content/marketing/*"
|
- "aio/content/marketing/*"
|
||||||
|
- "aio/content/images/marketing/*"
|
||||||
- "aio/content/navigation.json"
|
- "aio/content/navigation.json"
|
||||||
- "aio/content/license.md"
|
- "aio/content/license.md"
|
||||||
users:
|
users:
|
||||||
@ -368,3 +497,43 @@ groups:
|
|||||||
- IgorMinar
|
- IgorMinar
|
||||||
- robwormald
|
- robwormald
|
||||||
- mhevery #fallback
|
- mhevery #fallback
|
||||||
|
|
||||||
|
docs/observables:
|
||||||
|
conditions:
|
||||||
|
files:
|
||||||
|
- "aio/content/examples/observables/*"
|
||||||
|
- "aio/content/images/guide/observables/*"
|
||||||
|
- "aio/content/guide/observables.md"
|
||||||
|
- "aio/content/guide/comparing-observables.md"
|
||||||
|
- "aio/content/examples/observables-in-angular/*"
|
||||||
|
- "aio/content/images/guide/observables-in-angular/*"
|
||||||
|
- "aio/content/guide/observables-in-angular.md"
|
||||||
|
- "aio/content/examples/practical-observable-usage/*"
|
||||||
|
- "aio/content/guide/practical-observable-usage.md"
|
||||||
|
- "aio/content/examples/rx-library/*"
|
||||||
|
- "aio/content/guide/rx-library.md"
|
||||||
|
users:
|
||||||
|
- jasonaden
|
||||||
|
- benlesh
|
||||||
|
- IgorMinar
|
||||||
|
- mhevery
|
||||||
|
- jenniferfell #docs only
|
||||||
|
|
||||||
|
docs/packaging:
|
||||||
|
conditions:
|
||||||
|
files:
|
||||||
|
- "aio/content/guide/npm-packages.md"
|
||||||
|
- "aio/content/guide/browser-support.md"
|
||||||
|
- "aio/content/guide/typescript-configuration.md"
|
||||||
|
- "aio/content/guide/setup-systemjs-anatomy.md"
|
||||||
|
- "aio/content/examples/setup/*"
|
||||||
|
- "aio/content/guide/setup.md"
|
||||||
|
- "aio/content/guide/deployment.md"
|
||||||
|
- "aio/content/guide/releases.md"
|
||||||
|
- "aio/content/guide/updating.md"
|
||||||
|
users:
|
||||||
|
- IgorMinar #primary
|
||||||
|
- alexeagle
|
||||||
|
- hansl
|
||||||
|
- mhevery #fallback
|
||||||
|
- jenniferfell #docs only
|
||||||
|
44
BUILD.bazel
44
BUILD.bazel
@ -5,53 +5,41 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "node_modules_filegroup")
|
|||||||
exports_files([
|
exports_files([
|
||||||
"tsconfig.json",
|
"tsconfig.json",
|
||||||
"LICENSE",
|
"LICENSE",
|
||||||
|
"protractor-perf.conf.js",
|
||||||
])
|
])
|
||||||
|
|
||||||
# Developers should always run `bazel run :install`
|
# Developers should always run `bazel run :install`
|
||||||
# This ensures that package.json in subdirectories get installed as well.
|
# This ensures that package.json in subdirectories get installed as well.
|
||||||
alias(
|
alias(
|
||||||
name = "install",
|
name = "install",
|
||||||
actual = "@yarn//:yarn",
|
actual = "@nodejs//:yarn",
|
||||||
)
|
)
|
||||||
|
|
||||||
node_modules_filegroup(
|
alias(
|
||||||
name = "node_modules",
|
name = "node_modules",
|
||||||
packages = [
|
actual = "@angular_deps//:node_modules",
|
||||||
"bytebuffer",
|
|
||||||
"hammerjs",
|
|
||||||
"jasmine",
|
|
||||||
"minimist",
|
|
||||||
"protobufjs",
|
|
||||||
"reflect-metadata",
|
|
||||||
"source-map-support",
|
|
||||||
"tsickle",
|
|
||||||
"tslib",
|
|
||||||
"tsutils",
|
|
||||||
"typescript",
|
|
||||||
"zone.js",
|
|
||||||
"@angular-devkit/core",
|
|
||||||
"@angular-devkit/schematics",
|
|
||||||
"@types",
|
|
||||||
"@webcomponents/custom-elements",
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "web_test_bootstrap_scripts",
|
name = "web_test_bootstrap_scripts",
|
||||||
# do not sort
|
# do not sort
|
||||||
srcs = [
|
srcs = [
|
||||||
"//:node_modules/reflect-metadata/Reflect.js",
|
"@angular_deps//:node_modules/reflect-metadata/Reflect.js",
|
||||||
"//:node_modules/zone.js/dist/zone.js",
|
"@angular_deps//:node_modules/zone.js/dist/zone.js",
|
||||||
"//:node_modules/zone.js/dist/zone-testing.js",
|
"@angular_deps//:node_modules/zone.js/dist/zone-testing.js",
|
||||||
"//:node_modules/zone.js/dist/task-tracking.js",
|
"@angular_deps//:node_modules/zone.js/dist/task-tracking.js",
|
||||||
|
"//:test-events.js",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "angularjs",
|
name = "angularjs_scripts",
|
||||||
# do not sort
|
|
||||||
srcs = [
|
srcs = [
|
||||||
"//:node_modules/angular/angular.js",
|
"@angular_deps//:node_modules/angular-1.5/angular.js",
|
||||||
"//:node_modules/angular-mocks/angular-mocks.js",
|
"@angular_deps//:node_modules/angular-1.6/angular.js",
|
||||||
|
"@angular_deps//:node_modules/angular-mocks-1.5/angular-mocks.js",
|
||||||
|
"@angular_deps//:node_modules/angular-mocks-1.6/angular-mocks.js",
|
||||||
|
"@angular_deps//:node_modules/angular-mocks/angular-mocks.js",
|
||||||
|
"@angular_deps//:node_modules/angular/angular.js",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
894
CHANGELOG.md
894
CHANGELOG.md
@ -1,229 +1,374 @@
|
|||||||
<a name="5.2.10"></a>
|
<a name="6.1.1"></a>
|
||||||
## [5.2.10](https://github.com/angular/angular/compare/5.2.9...5.2.10) (2018-04-16)
|
## [6.1.1](https://github.com/angular/angular/compare/6.1.0...6.1.1) (2018-08-02)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* **animations:** avoid animation insertions during router back/refresh ([#21977](https://github.com/angular/angular/issues/21977)) ([641cc49](https://github.com/angular/angular/commit/641cc49)), closes [#19712](https://github.com/angular/angular/issues/19712)
|
* **compiler-cli:** correct tsickle dependency version to fix typescript 2.9 compatibility ([fec29fa](https://github.com/angular/angular/commit/317c7087c56b72aa74cd6d6a8f719e6e7fec29fa))
|
||||||
* **common:** properly take className changes into account ([#21937](https://github.com/angular/angular/issues/21937)) ([54e9108](https://github.com/angular/angular/commit/54e9108)), closes [#21932](https://github.com/angular/angular/issues/21932)
|
|
||||||
* **compiler:** fix support for html-like text in translatable attributes ([#23053](https://github.com/angular/angular/issues/23053)) ([4f7c369](https://github.com/angular/angular/commit/4f7c369))
|
|
||||||
* **compiler-cli:** emit correct css string escape sequences ([#22776](https://github.com/angular/angular/issues/22776)) ([db0afa9](https://github.com/angular/angular/commit/db0afa9))
|
|
||||||
* **forms:** improve error message for invalid value accessors ([#22731](https://github.com/angular/angular/issues/22731)) ([dd61595](https://github.com/angular/angular/commit/dd61595))
|
|
||||||
* **service-worker:** add badge to NOTIFICATION_OPTION_NAMES ([#23241](https://github.com/angular/angular/issues/23241)) ([7b23983](https://github.com/angular/angular/commit/7b23983)), closes [#23196](https://github.com/angular/angular/issues/23196)
|
|
||||||
* **service-worker:** do not enter degraded mode when offline ([#22883](https://github.com/angular/angular/issues/22883)) ([ae9c25f](https://github.com/angular/angular/commit/ae9c25f)), closes [#21636](https://github.com/angular/angular/issues/21636)
|
|
||||||
* **service-worker:** fix LruList bugs ([#22769](https://github.com/angular/angular/issues/22769)) ([65f8943](https://github.com/angular/angular/commit/65f8943)), closes [#22218](https://github.com/angular/angular/issues/22218) [#22768](https://github.com/angular/angular/issues/22768)
|
|
||||||
* **service-worker:** ignore invalid `only-if-cached` requests ([#22883](https://github.com/angular/angular/issues/22883)) ([0d4fe38](https://github.com/angular/angular/commit/0d4fe38)), closes [#22362](https://github.com/angular/angular/issues/22362)
|
|
||||||
* **upgrade:** correctly handle downgraded `OnPush` components ([#22209](https://github.com/angular/angular/issues/22209)) ([f43fba6](https://github.com/angular/angular/commit/f43fba6)), closes [#14286](https://github.com/angular/angular/issues/14286)
|
|
||||||
* **upgrade:** propagate return value of resumeBootstrap ([#22754](https://github.com/angular/angular/issues/22754)) ([ae76eec](https://github.com/angular/angular/commit/ae76eec)), closes [#22723](https://github.com/angular/angular/issues/22723)
|
|
||||||
* **upgrade:** two-way binding and listening for event ([#22772](https://github.com/angular/angular/issues/22772)) ([5391f96](https://github.com/angular/angular/commit/5391f96)), closes [#22734](https://github.com/angular/angular/issues/22734)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="4.4.7"></a>
|
<a name="6.1.0"></a>
|
||||||
## [4.4.7](https://github.com/angular/angular/compare/4.4.6...4.4.7) (2018-04-16)
|
# [6.1.0](https://github.com/angular/angular/compare/6.0.0-rc.5...6.1.0) (2018-07-25)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* **core:** use appropriate inert document strategy for Firefox & Safari ([#22077](https://github.com/angular/angular/issues/22077)) ([2c5cf19](https://github.com/angular/angular/commit/2c5cf19))
|
* **animations:** always render end-state styles for orphaned DOM nodes ([#24236](https://github.com/angular/angular/issues/24236)) ([dc4a3d0](https://github.com/angular/angular/commit/dc4a3d0))
|
||||||
|
* **animations:** set animations styles properly on platform-server ([#24624](https://github.com/angular/angular/issues/24624)) ([0b356d4](https://github.com/angular/angular/commit/0b356d4))
|
||||||
|
* **animations:** do not throw errors when a destroyed component is animated ([#23836](https://github.com/angular/angular/issues/23836)) ([d2a8687](https://github.com/angular/angular/commit/d2a8687))
|
||||||
|
* **animations:** Fix browser detection logic ([#24188](https://github.com/angular/angular/issues/24188)) ([b492b9e](https://github.com/angular/angular/commit/b492b9e))
|
||||||
<a name="6.0.0-rc.5"></a>
|
* **animations:** properly clean up queried element styles in safari/edge ([#23633](https://github.com/angular/angular/issues/23633)) ([da9ff25](https://github.com/angular/angular/commit/da9ff25))
|
||||||
## [6.0.0-rc.5](https://github.com/angular/angular/compare/6.0.0-rc.4...6.0.0-rc.5) (2018-04-14)
|
* **animations:** retain state styling for nodes that are moved around ([#23534](https://github.com/angular/angular/issues/23534)) ([65211f4](https://github.com/angular/angular/commit/65211f4))
|
||||||
|
* **animations:** retain trigger-state for nodes that are moved around ([#24238](https://github.com/angular/angular/issues/24238)) ([8db928d](https://github.com/angular/angular/commit/8db928d))
|
||||||
|
* **bazel:** Allow ng_module to depend on targets w no deps ([#24446](https://github.com/angular/angular/issues/24446)) ([282d351](https://github.com/angular/angular/commit/282d351))
|
||||||
### Bug Fixes
|
* **benchpress:** Fix promise chain in chrome_driver_extension. ([#23458](https://github.com/angular/angular/issues/23458)) ([d4b6c41](https://github.com/angular/angular/commit/d4b6c41))
|
||||||
|
* **common:** do not round factional seconds ([#24831](https://github.com/angular/angular/issues/24831)) ([a527c69](https://github.com/angular/angular/commit/a527c69)), closes [#24384](https://github.com/angular/angular/issues/24384)
|
||||||
* **compiler:** use correct global name in compiler.umd.js ([#23354](https://github.com/angular/angular/issues/23354)) ([b76dd3b](https://github.com/angular/angular/commit/b76dd3b)), closes [#23343](https://github.com/angular/angular/issues/23343)
|
* **common:** format fractional seconds ([#24844](https://github.com/angular/angular/issues/24844)) ([0b4d85e](https://github.com/angular/angular/commit/0b4d85e)), closes [#24831](https://github.com/angular/angular/issues/24831)
|
||||||
* **compiler-cli:** shorten resolved module name in fileNameToModuleName to npm package name for typings ([#23231](https://github.com/angular/angular/issues/23231)) ([6199ea5](https://github.com/angular/angular/commit/6199ea5))
|
* **common:** properly update collection reference in NgForOf ([#24684](https://github.com/angular/angular/issues/24684)) ([ff84c5c](https://github.com/angular/angular/commit/ff84c5c)), closes [#24155](https://github.com/angular/angular/issues/24155)
|
||||||
* **elements:** include schematics in npm distro ([#23350](https://github.com/angular/angular/issues/23350)) ([9fabe2f](https://github.com/angular/angular/commit/9fabe2f))
|
* **common:** use correct currency format for locale de-AT ([#24658](https://github.com/angular/angular/issues/24658)) ([dcabb05](https://github.com/angular/angular/commit/dcabb05)), closes [#24609](https://github.com/angular/angular/issues/24609)
|
||||||
* **service-worker:** let `*` match 0 characters in globs ([#23339](https://github.com/angular/angular/issues/23339)) ([6c2c958](https://github.com/angular/angular/commit/6c2c958))
|
* **common:** use correct ICU plural for locale mk ([#24659](https://github.com/angular/angular/issues/24659)) ([64a8584](https://github.com/angular/angular/commit/64a8584))
|
||||||
|
* **compiler:** fix a few non-tree-shakeable code patterns ([#24677](https://github.com/angular/angular/issues/24677)) ([50d4a4f](https://github.com/angular/angular/commit/50d4a4f))
|
||||||
|
* **compiler:** i18n_extractor now outputs the correct source file name ([#24885](https://github.com/angular/angular/issues/24885)) ([c8ad965](https://github.com/angular/angular/commit/c8ad965)), closes [#24884](https://github.com/angular/angular/issues/24884)
|
||||||
|
* **compiler:** support `.` in import statements. ([#20634](https://github.com/angular/angular/issues/20634)) ([d8f7b29](https://github.com/angular/angular/commit/d8f7b29)), closes [#20363](https://github.com/angular/angular/issues/20363)
|
||||||
|
* **compiler:** avoid a crash in ngc-wrapped. ([#23468](https://github.com/angular/angular/issues/23468)) ([e1c4930](https://github.com/angular/angular/commit/e1c4930))
|
||||||
|
* **compiler:** generate constant array for i18n attributes ([#23837](https://github.com/angular/angular/issues/23837)) ([cfde36d](https://github.com/angular/angular/commit/cfde36d))
|
||||||
|
* **compiler:** generate core-compliant hostBindings property ([#24087](https://github.com/angular/angular/issues/24087)) ([01b5acd](https://github.com/angular/angular/commit/01b5acd)), closes [#24013](https://github.com/angular/angular/issues/24013)
|
||||||
|
* **compiler:** handle undefined annotation metadata ([#23349](https://github.com/angular/angular/issues/23349)) ([ca776c5](https://github.com/angular/angular/commit/ca776c5))
|
||||||
|
* **compiler-cli:** Use typescript to resolve modules for metadata ([#22856](https://github.com/angular/angular/issues/22856)) ([0d5f2d3](https://github.com/angular/angular/commit/0d5f2d3))
|
||||||
|
* **compiler-cli:** don't rely on incompatible TS method ([#23550](https://github.com/angular/angular/issues/23550)) ([b1f040f](https://github.com/angular/angular/commit/b1f040f))
|
||||||
|
* **core:** stop reusing provider definitions across NgModuleRef instances ([#25022](https://github.com/angular/angular/issues/25022)) ([6b859da](https://github.com/angular/angular/commit/6b859da)), closes [#25018](https://github.com/angular/angular/issues/25018)
|
||||||
|
* **core:** mark NgModule as not the root if APP_ROOT is set to false ([#24814](https://github.com/angular/angular/issues/24814)) ([1089261](https://github.com/angular/angular/commit/1089261))
|
||||||
|
* **core:** use addCustomEqualityTester instead of overriding toEqual ([#22983](https://github.com/angular/angular/issues/22983)) ([0922228](https://github.com/angular/angular/commit/0922228)), closes [#22939](https://github.com/angular/angular/issues/22939)
|
||||||
|
* **core:** Injector correctly honors the @Self flag ([#24520](https://github.com/angular/angular/issues/24520)) ([ccbda9d](https://github.com/angular/angular/commit/ccbda9d))
|
||||||
|
* **core:** avoid eager providers re-initialization ([#23559](https://github.com/angular/angular/issues/23559)) ([0c6dc45](https://github.com/angular/angular/commit/0c6dc45))
|
||||||
|
* **core:** call ngOnDestroy on all services that have it ([#23755](https://github.com/angular/angular/issues/23755)) ([fc03427](https://github.com/angular/angular/commit/fc03427)), closes [#22466](https://github.com/angular/angular/issues/22466) [#22240](https://github.com/angular/angular/issues/22240) [#14818](https://github.com/angular/angular/issues/14818)
|
||||||
|
* **docs-infra:** fix table header layout in API pages ([#24919](https://github.com/angular/angular/issues/24919)) ([3cd9645](https://github.com/angular/angular/commit/3cd9645))
|
||||||
|
* **elements:** always check to create strategy ([#23825](https://github.com/angular/angular/issues/23825)) ([b1cda36](https://github.com/angular/angular/commit/b1cda36))
|
||||||
|
* **elements:** prevent closure renaming of platform properties ([#23843](https://github.com/angular/angular/issues/23843)) ([d4b8b24](https://github.com/angular/angular/commit/d4b8b24))
|
||||||
|
* **forms:** properly handle special properties in FormGroup.get ([#22249](https://github.com/angular/angular/issues/22249)) ([9367e91](https://github.com/angular/angular/commit/9367e91)), closes [#17195](https://github.com/angular/angular/issues/17195)
|
||||||
|
* **language-service:** do not overwrite native `Reflect` ([#24299](https://github.com/angular/angular/issues/24299)) ([6881404](https://github.com/angular/angular/commit/6881404)), closes [#21420](https://github.com/angular/angular/issues/21420)
|
||||||
|
* **platform-browser:** add missing deps for HammerGesturesPlugin ([#24682](https://github.com/angular/angular/issues/24682)) ([13d60ea](https://github.com/angular/angular/commit/13d60ea))
|
||||||
|
* **platform-browser:** mark Meta and Title services as tree shakable providers ([#24815](https://github.com/angular/angular/issues/24815)) ([197387d](https://github.com/angular/angular/commit/197387d))
|
||||||
|
* **platform-browser:** workaround wrong import path generated by ngc for DOCUMENT ([#24830](https://github.com/angular/angular/issues/24830)) ([7d27ecc](https://github.com/angular/angular/commit/7d27ecc))
|
||||||
|
* **platform-server:** avoid clash between server and client style encapsulation attributes ([#24158](https://github.com/angular/angular/issues/24158)) ([b96a3c8](https://github.com/angular/angular/commit/b96a3c8))
|
||||||
|
* **platform-server:** avoid dependency cycle when using http interceptor ([#24229](https://github.com/angular/angular/issues/24229)) ([60aa943](https://github.com/angular/angular/commit/60aa943)), closes [#23023](https://github.com/angular/angular/issues/23023)
|
||||||
|
* **platform-server:** don't reflect innerHTML property to attribute ([#24213](https://github.com/angular/angular/issues/24213)) ([6a663a4](https://github.com/angular/angular/commit/6a663a4)), closes [#19278](https://github.com/angular/angular/issues/19278)
|
||||||
|
* **platform-server:** provide Domino DOM types globally ([#24116](https://github.com/angular/angular/issues/24116)) ([c73196e](https://github.com/angular/angular/commit/c73196e)), closes [#23280](https://github.com/angular/angular/issues/23280) [#23133](https://github.com/angular/angular/issues/23133)
|
||||||
|
* **router:** Fix _lastPathIndex in deeply nested empty paths ([#22394](https://github.com/angular/angular/issues/22394)) ([968f153](https://github.com/angular/angular/commit/968f153))
|
||||||
|
* **router:** add ability to recover from malformed url ([#23283](https://github.com/angular/angular/issues/23283)) ([86d254d](https://github.com/angular/angular/commit/86d254d)), closes [#21468](https://github.com/angular/angular/issues/21468)
|
||||||
|
* **router:** fix lazy loading of aux routes ([#23459](https://github.com/angular/angular/issues/23459)) ([5731d07](https://github.com/angular/angular/commit/5731d07)), closes [#10981](https://github.com/angular/angular/issues/10981)
|
||||||
|
* **router:** avoid freezing queryParams in-place ([#22663](https://github.com/angular/angular/issues/22663)) ([89f64e5](https://github.com/angular/angular/commit/89f64e5)), closes [#22617](https://github.com/angular/angular/issues/22617)
|
||||||
|
* **router:** cache route handle if found ([#22475](https://github.com/angular/angular/issues/22475)) ([4cfa571](https://github.com/angular/angular/commit/4cfa571)), closes [#22474](https://github.com/angular/angular/issues/22474)
|
||||||
|
* **router:** correct the segment parsing so it won't break on ampersand ([#23684](https://github.com/angular/angular/issues/23684)) ([553a680](https://github.com/angular/angular/commit/553a680))
|
||||||
|
* **service-worker:** don't include sourceMappingURL in ngsw-worker ([#24877](https://github.com/angular/angular/issues/24877)) ([8620373](https://github.com/angular/angular/commit/8620373)), closes [#23596](https://github.com/angular/angular/issues/23596)
|
||||||
|
* **service-worker:** avoid network requests when looking up hashed resources in cache ([#24127](https://github.com/angular/angular/issues/24127)) ([52d43a9](https://github.com/angular/angular/commit/52d43a9))
|
||||||
|
* **service-worker:** fix `SwPush.unsubscribe()` ([#24162](https://github.com/angular/angular/issues/24162)) ([3ed2d75](https://github.com/angular/angular/commit/3ed2d75)), closes [#24095](https://github.com/angular/angular/issues/24095)
|
||||||
|
* **service-worker:** add badge to NOTIFICATION_OPTION_NAMES ([#23241](https://github.com/angular/angular/issues/23241)) ([fb59b2d](https://github.com/angular/angular/commit/fb59b2d)), closes [#23196](https://github.com/angular/angular/issues/23196)
|
||||||
|
* **service-worker:** check platformBrowser before accessing navigator.serviceWorker ([#21231](https://github.com/angular/angular/issues/21231)) ([0bdd30e](https://github.com/angular/angular/commit/0bdd30e))
|
||||||
|
* **service-worker:** correctly handle requests with empty `clientId` ([#23625](https://github.com/angular/angular/issues/23625)) ([e0ed59e](https://github.com/angular/angular/commit/e0ed59e)), closes [#23526](https://github.com/angular/angular/issues/23526)
|
||||||
|
* **service-worker:** deprecate `versionedFiles` in asset-group resources ([#23584](https://github.com/angular/angular/issues/23584)) ([1d378e2](https://github.com/angular/angular/commit/1d378e2))
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
* **platform-browser:** add token marking which the type of animation module nearest in the injector tree ([#23075](https://github.com/angular/angular/issues/23075)) ([b551f84](https://github.com/angular/angular/commit/b551f84))
|
* **bazel:** Initial commit of protractor_web_test_suite ([#24787](https://github.com/angular/angular/issues/24787)) ([71e0df0](https://github.com/angular/angular/commit/71e0df0))
|
||||||
* **service-worker:** add support for configuring navigations URLs ([#23339](https://github.com/angular/angular/issues/23339)) ([08325aa](https://github.com/angular/angular/commit/08325aa)), closes [#20404](https://github.com/angular/angular/issues/20404)
|
* **bazel:** protractor_web_test_suite for release ([#24787](https://github.com/angular/angular/issues/24787)) ([161ff5c](https://github.com/angular/angular/commit/161ff5c))
|
||||||
|
* **common:** introduce KeyValuePipe ([#24319](https://github.com/angular/angular/issues/24319)) ([2b49bf7](https://github.com/angular/angular/commit/2b49bf7))
|
||||||
|
* **compiler:** support `// ...` and `// TODO` in mock compiler expectations ([#23441](https://github.com/angular/angular/issues/23441)) ([c6b206e](https://github.com/angular/angular/commit/c6b206e))
|
||||||
|
* **compiler-cli:** update `tsickle` to `0.29.x` ([#24233](https://github.com/angular/angular/issues/24233)) ([f69ac67](https://github.com/angular/angular/commit/f69ac67))
|
||||||
|
* **core:** export defaultKeyValueDiffers to private api ([#24319](https://github.com/angular/angular/issues/24319)) ([92b278c](https://github.com/angular/angular/commit/92b278c))
|
||||||
|
* **core:** expose a Compiler API for accessing module ids from NgModule types ([#24258](https://github.com/angular/angular/issues/24258)) ([bd02b27](https://github.com/angular/angular/commit/bd02b27))
|
||||||
|
* **core:** KeyValueDiffer#diff allows null values ([#24319](https://github.com/angular/angular/issues/24319)) ([52ce9d5](https://github.com/angular/angular/commit/52ce9d5))
|
||||||
|
* **core:** add support for ShadowDOM v1 ([#24718](https://github.com/angular/angular/issues/24718)) ([3553977](https://github.com/angular/angular/commit/3553977))
|
||||||
|
(https://github.com/angular/angular/commit/328971f)), closes [#24616](https://github.com/angular/angular/issues/24616)
|
||||||
|
* **platform-browser:** add HammerJS lazy-loader symbols to public API ([#23943](https://github.com/angular/angular/issues/23943)) ([26fbf1d](https://github.com/angular/angular/commit/26fbf1d))
|
||||||
|
* **platform-browser:** allow lazy-loading HammerJS ([#23906](https://github.com/angular/angular/issues/23906)) ([313bdce](https://github.com/angular/angular/commit/313bdce))
|
||||||
|
* **platform-server:** use EventManagerPlugin on the server ([#24132](https://github.com/angular/angular/issues/24132)) ([d6595eb](https://github.com/angular/angular/commit/d6595eb))
|
||||||
|
* **router:** add urlUpdateStrategy allow updating the browser URL at the beginning of navigation ([#24820](https://github.com/angular/angular/issues/24820)) ([328971f]
|
||||||
|
* **router:** add navigation execution context info to activation hooks ([#24204](https://github.com/angular/angular/issues/24204)) ([20c463e](https://github.com/angular/angular/commit/20c463e)), closes [#24202](https://github.com/angular/angular/issues/24202)
|
||||||
|
* **router:** implement scrolling restoration service ([#20030](https://github.com/angular/angular/issues/20030)) ([49c5234](https://github.com/angular/angular/commit/49c5234)), closes [#13636](https://github.com/angular/angular/issues/13636) [#10929](https://github.com/angular/angular/issues/10929) [#7791](https://github.com/angular/angular/issues/7791) [#6595](https://github.com/angular/angular/issues/6595)
|
||||||
|
* **service-worker:** add support for `?` in SW config globbing ([#24105](https://github.com/angular/angular/issues/24105)) ([250527c](https://github.com/angular/angular/commit/250527c))
|
||||||
|
* typescript 2.9 support ([#24652](https://github.com/angular/angular/issues/24652)) ([e3064d5](https://github.com/angular/angular/commit/e3064d5))
|
||||||
|
|
||||||
|
### build
|
||||||
|
|
||||||
|
* **bazel:** turn on preserve-symlinks ([#24881](https://github.com/angular/angular/issues/24881)) ([c438b5e](https://github.com/angular/angular/commit/c438b5e))
|
||||||
<a name="6.0.0-rc.4"></a>
|
|
||||||
## [6.0.0-rc.4](https://github.com/angular/angular/compare/6.0.0-rc.3...6.0.0-rc.4) (2018-04-12)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** set rollup output.name and amd.id ([#23274](https://github.com/angular/angular/issues/23274)) ([3e8eef6](https://github.com/angular/angular/commit/3e8eef6)), closes [#23238](https://github.com/angular/angular/issues/23238)
|
|
||||||
* **common:** replace i18n locale undefined values by a const ([#23265](https://github.com/angular/angular/issues/23265)) ([5706810](https://github.com/angular/angular/commit/5706810)), closes [#22988](https://github.com/angular/angular/issues/22988)
|
|
||||||
* **common:** workaround UMD/webpack limitation ([#23271](https://github.com/angular/angular/issues/23271)) ([5a298b1](https://github.com/angular/angular/commit/5a298b1)), closes [#23217](https://github.com/angular/angular/issues/23217)
|
|
||||||
* **compiler:** Pretty print object instead of [Object object] ([#22689](https://github.com/angular/angular/issues/22689)) ([8555a3a](https://github.com/angular/angular/commit/8555a3a))
|
|
||||||
* **compiler-cli:** strictMetadataEmit should not break on non-compliant libraries ([#23275](https://github.com/angular/angular/issues/23275)) ([5814355](https://github.com/angular/angular/commit/5814355)), closes [#22210](https://github.com/angular/angular/issues/22210)
|
|
||||||
* **elements:** avoid exception when window is undefined ([#23324](https://github.com/angular/angular/issues/23324)) ([af46d09](https://github.com/angular/angular/commit/af46d09))
|
|
||||||
* **platform-server:** require node v8+ ([#23331](https://github.com/angular/angular/issues/23331)) ([bbfa1d3](https://github.com/angular/angular/commit/bbfa1d3))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **elements:** add schematics ([#23298](https://github.com/angular/angular/issues/23298)) ([37d2cb4](https://github.com/angular/angular/commit/37d2cb4))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="6.0.0-rc.3"></a>
|
|
||||||
## [6.0.0-rc.3](https://github.com/angular/angular/compare/6.0.0-rc.2...6.0.0-rc.3) (2018-04-06)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** don't produce ngfactory files for ng_packages ([#23237](https://github.com/angular/angular/issues/23237)) ([da58a55](https://github.com/angular/angular/commit/da58a55))
|
|
||||||
* **compiler-cli:** don't lower expressions in flat module metadata ([#23226](https://github.com/angular/angular/issues/23226)) ([11ea3a3](https://github.com/angular/angular/commit/11ea3a3))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="6.0.0-rc.2"></a>
|
|
||||||
## [6.0.0-rc.2](https://github.com/angular/angular/compare/6.0.0-rc.1...6.0.0-rc.2) (2018-04-05)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **common:** `locales` are not being shipped ([#23136](https://github.com/angular/angular/issues/23136)) ([7ca7720](https://github.com/angular/angular/commit/7ca7720))
|
|
||||||
* **common:** properly take className changes into account ([#21937](https://github.com/angular/angular/issues/21937)) ([4a42669](https://github.com/angular/angular/commit/4a42669)), closes [#21932](https://github.com/angular/angular/issues/21932)
|
|
||||||
* **compiler-cli:** flat module index metadata should be transformed ([#23129](https://github.com/angular/angular/issues/23129)) ([f99cb5c](https://github.com/angular/angular/commit/f99cb5c))
|
|
||||||
* **core:** inject() should always work in an NgModule injection scope ([#23148](https://github.com/angular/angular/issues/23148)) ([fab6b39](https://github.com/angular/angular/commit/fab6b39)), closes [angular/material2#10586](https://github.com/angular/material2/issues/10586)
|
|
||||||
* **forms:** improve error message for invalid value accessors ([#22731](https://github.com/angular/angular/issues/22731)) ([23cc3ef](https://github.com/angular/angular/commit/23cc3ef))
|
|
||||||
* **upgrade:** correctly handle downgraded `OnPush` components ([#22209](https://github.com/angular/angular/issues/22209)) ([ad9ce5c](https://github.com/angular/angular/commit/ad9ce5c)), closes [#14286](https://github.com/angular/angular/issues/14286)
|
|
||||||
* **upgrade:** propagate return value of resumeBootstrap ([#22754](https://github.com/angular/angular/issues/22754)) ([a2330ff](https://github.com/angular/angular/commit/a2330ff)), closes [#22723](https://github.com/angular/angular/issues/22723)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **compiler-cli:** lower loadChildren fields to allow dynamic module paths ([#23088](https://github.com/angular/angular/issues/23088)) ([550433a](https://github.com/angular/angular/commit/550433a))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="6.0.0-rc.1"></a>
|
|
||||||
## [6.0.0-rc.1](https://github.com/angular/angular/compare/6.0.0-rc.0...6.0.0-rc.1) (2018-03-30)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **animations:** avoid animation insertions during router back/refresh ([#21977](https://github.com/angular/angular/issues/21977)) ([f88fba0](https://github.com/angular/angular/commit/f88fba0)), closes [#19712](https://github.com/angular/angular/issues/19712)
|
|
||||||
* **animations:** treat numeric state name values as strings ([#22923](https://github.com/angular/angular/issues/22923)) ([e5e1b0d](https://github.com/angular/angular/commit/e5e1b0d))
|
|
||||||
* **bazel:** complete the rollup globals list for all angular entrypoints ([#23080](https://github.com/angular/angular/issues/23080)) ([439030f](https://github.com/angular/angular/commit/439030f))
|
|
||||||
* **bazel:** don't inline tslib into fesms ([#23044](https://github.com/angular/angular/issues/23044)) ([0049743](https://github.com/angular/angular/commit/0049743))
|
|
||||||
* **bazel:** don't try to do flatmoduleindex under Blaze ([#23083](https://github.com/angular/angular/issues/23083)) ([be10bf5](https://github.com/angular/angular/commit/be10bf5))
|
|
||||||
* **bazel:** downlevel decorators in fesm5 files ([#23078](https://github.com/angular/angular/issues/23078)) ([481b22e](https://github.com/angular/angular/commit/481b22e))
|
|
||||||
* **bazel:** ng_package packages attr not forwarded to npm_package ([#22967](https://github.com/angular/angular/issues/22967)) ([2aabbc5](https://github.com/angular/angular/commit/2aabbc5))
|
|
||||||
* **bazel:** ng_package should include private exports in fesms ([#23054](https://github.com/angular/angular/issues/23054)) ([0d9140c](https://github.com/angular/angular/commit/0d9140c))
|
|
||||||
* **bazel:** pass --global option to rollup ([#23073](https://github.com/angular/angular/issues/23073)) ([45e090b](https://github.com/angular/angular/commit/45e090b))
|
|
||||||
* **common:** titlecase pipe ([#22600](https://github.com/angular/angular/issues/22600)) ([7966744](https://github.com/angular/angular/commit/7966744))
|
|
||||||
* **compiler:** don't typecheck all inputs ([#22899](https://github.com/angular/angular/issues/22899)) ([838a610](https://github.com/angular/angular/commit/838a610))
|
|
||||||
* consistently rewrite Injector to INJECTOR ([#23008](https://github.com/angular/angular/issues/23008)) ([884bf0e](https://github.com/angular/angular/commit/884bf0e))
|
|
||||||
* **compiler:** fix support for html-like text in translatable attributes ([#23053](https://github.com/angular/angular/issues/23053)) ([28058b7](https://github.com/angular/angular/commit/28058b7))
|
|
||||||
* **compiler:** take quoting into account when determining if object literals can be shared ([#22942](https://github.com/angular/angular/issues/22942)) ([d98e9e7](https://github.com/angular/angular/commit/d98e9e7))
|
|
||||||
* **compiler-cli:** use numeric comparison for TypeScript version ([#22705](https://github.com/angular/angular/issues/22705)) ([193737a](https://github.com/angular/angular/commit/193737a)), closes [#22593](https://github.com/angular/angular/issues/22593)
|
|
||||||
* **core:** don't override ngInjectableDef in the decorator if present on the type ([#22943](https://github.com/angular/angular/issues/22943)) ([6f01917](https://github.com/angular/angular/commit/6f01917))
|
|
||||||
* **service-worker:** do not enter degraded mode when offline ([#22883](https://github.com/angular/angular/issues/22883)) ([9e9b8dd](https://github.com/angular/angular/commit/9e9b8dd)), closes [#21636](https://github.com/angular/angular/issues/21636)
|
|
||||||
* **service-worker:** fix LruList bugs ([#22769](https://github.com/angular/angular/issues/22769)) ([8c2a578](https://github.com/angular/angular/commit/8c2a578)), closes [#22218](https://github.com/angular/angular/issues/22218) [#22768](https://github.com/angular/angular/issues/22768)
|
|
||||||
* **service-worker:** ignore invalid `only-if-cached` requests ([#22883](https://github.com/angular/angular/issues/22883)) ([d9dc46e](https://github.com/angular/angular/commit/d9dc46e)), closes [#22362](https://github.com/angular/angular/issues/22362)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **bazel:** prefix private-export (barred-latin-o) symbols ([#23007](https://github.com/angular/angular/issues/23007)) ([27e14b2](https://github.com/angular/angular/commit/27e14b2))
|
|
||||||
* **compiler:** lower @NgModule ids if needed ([#23031](https://github.com/angular/angular/issues/23031)) ([bd024c0](https://github.com/angular/angular/commit/bd024c0))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="6.0.0-rc.0"></a>
|
|
||||||
# [6.0.0-rc.0](https://github.com/angular/angular/compare/6.0.0-beta.8...6.0.0-rc.0) (2018-03-21)
|
|
||||||
|
|
||||||
v6 framework is now feature complete, the cli and material/cdk parts of the v6 release and other integrations are still
|
|
||||||
in works and will be completed by the time we cut v6.0.0.
|
|
||||||
|
|
||||||
Please [file new issues](https://github.com/angular/angular/issues/new) at our issue tracker with as many details as
|
|
||||||
possible, and ideally also a include a good reproduction of the problem.
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** correct expected outs for external sources in ng_module ([#22755](https://github.com/angular/angular/issues/22755)) ([bfe077a](https://github.com/angular/angular/commit/bfe077a))
|
|
||||||
* **compiler:** do not emit line/char in ngsummary files. ([#22840](https://github.com/angular/angular/issues/22840)) ([5c387a7](https://github.com/angular/angular/commit/5c387a7))
|
|
||||||
* correct several esm2015 entry-points in package.jsons ([#22892](https://github.com/angular/angular/issues/22892)) ([7d095b9](https://github.com/angular/angular/commit/7d095b9))
|
|
||||||
* **router:** don't use spread operator to workaround an issue in closure compiler ([#22884](https://github.com/angular/angular/issues/22884)) ([e6c731f](https://github.com/angular/angular/commit/e6c731f))
|
|
||||||
* **router:** make locationSyncBootstrapListener public due to change in output after TS 2.7 update in [#22669](https://github.com/angular/angular/issues/22669) ([#22896](https://github.com/angular/angular/issues/22896)) ([623d769](https://github.com/angular/angular/commit/623d769))
|
|
||||||
* **upgrade:** two-way binding and listening for event ([#22772](https://github.com/angular/angular/issues/22772)) ([2b3de63](https://github.com/angular/angular/commit/2b3de63)), closes [#22734](https://github.com/angular/angular/issues/22734)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **core:** update the package output of build.sh to [APF v6](https://goo.gl/jB3GVv) ([#22808](https://github.com/angular/angular/issues/22808)) ([ce63dc6](https://github.com/angular/angular/commit/ce63dc6))
|
|
||||||
* **core:** upgrade rxjs to 6.0.0-beta.0, please see this [RxJS Upgrade Guide](https://goo.gl/osWFzo) for more info ([#22573](https://github.com/angular/angular/issues/22573)) ([b43f8bc](https://github.com/angular/angular/commit/b43f8bc))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="6.0.0-beta.8"></a>
|
|
||||||
## [6.0.0-beta.8](https://github.com/angular/angular/compare/6.0.0-beta.7...6.0.0-beta.8) (2018-03-16)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **aio:** constrain error logging to improve reporting ([#22713](https://github.com/angular/angular/issues/22713)) ([049757b](https://github.com/angular/angular/commit/049757b))
|
|
||||||
* **compiler-cli:** annotate Ivy fields as [@nocollapse](https://github.com/nocollapse) in closure mode ([#22691](https://github.com/angular/angular/issues/22691)) ([6e00410](https://github.com/angular/angular/commit/6e00410))
|
|
||||||
* **compiler-cli:** disableTypeScriptVersionCheck should be applied even for older tsc versions ([#22669](https://github.com/angular/angular/issues/22669)) ([3f70aba](https://github.com/angular/angular/commit/3f70aba))
|
|
||||||
* **compiler-cli:** emit correct css string escape sequences ([#22776](https://github.com/angular/angular/issues/22776)) ([6e5e819](https://github.com/angular/angular/commit/6e5e819))
|
|
||||||
* **compiler-cli:** enableResourceInlining handles both styles and styleUrls ([#22688](https://github.com/angular/angular/issues/22688)) ([40315be](https://github.com/angular/angular/commit/40315be))
|
|
||||||
* **compiler-cli:** generate proper exports.* identifiers in cjs output ([#22564](https://github.com/angular/angular/issues/22564)) ([0d8deb0](https://github.com/angular/angular/commit/0d8deb0))
|
|
||||||
* **compiler-cli:** resolve resource URLs before loading them under enableResourceInlining ([#22688](https://github.com/angular/angular/issues/22688)) ([123efba](https://github.com/angular/angular/commit/123efba))
|
|
||||||
* **core:** remove core animation import symbols ([#22692](https://github.com/angular/angular/issues/22692)) ([f5a98f4](https://github.com/angular/angular/commit/f5a98f4))
|
|
||||||
* **elements:** fix elements test bootstrap ([#22839](https://github.com/angular/angular/issues/22839)) ([5d82d8d](https://github.com/angular/angular/commit/5d82d8d))
|
|
||||||
* overloading a function doesn't generate all of the signatures ([#22569](https://github.com/angular/angular/issues/22569)) ([e8326e6](https://github.com/angular/angular/commit/e8326e6))
|
|
||||||
* **platform-server:** add styles to elements correctly ([#22527](https://github.com/angular/angular/issues/22527)) ([cd2ebd2](https://github.com/angular/angular/commit/cd2ebd2))
|
|
||||||
* **router:** correct over-encoding of URL fragment ([#22687](https://github.com/angular/angular/issues/22687)) ([0bf6fa5](https://github.com/angular/angular/commit/0bf6fa5))
|
|
||||||
|
|
||||||
|
|
||||||
### Code Refactoring
|
|
||||||
|
|
||||||
* **compiler:** Drop support for the deprecated `<template>`. Use `<ng-template>` instead ([#22783](https://github.com/angular/angular/issues/22783)) ([0ebd577](https://github.com/angular/angular/commit/0ebd577))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **aio:** add hack, remove me ([#22413](https://github.com/angular/angular/issues/22413)) ([4d506ac](https://github.com/angular/angular/commit/4d506ac))
|
|
||||||
* **aio:** migrate embedded comp to elements ([#22413](https://github.com/angular/angular/issues/22413)) ([7c9b411](https://github.com/angular/angular/commit/7c9b411))
|
|
||||||
* **aio:** update payload size ([#22413](https://github.com/angular/angular/issues/22413)) ([400460c](https://github.com/angular/angular/commit/400460c))
|
|
||||||
* **animations:** expose `element` and `params` within transition matchers ([#22693](https://github.com/angular/angular/issues/22693)) ([58b94e6](https://github.com/angular/angular/commit/58b94e6))
|
|
||||||
* **bazel:** change ng_package rule to APF v6 ([#22782](https://github.com/angular/angular/issues/22782)) ([88b3198](https://github.com/angular/angular/commit/88b3198))
|
|
||||||
* **compiler:** support for singleline, multiline & jsdoc comments ([#22715](https://github.com/angular/angular/issues/22715)) ([3b167be](https://github.com/angular/angular/commit/3b167be))
|
|
||||||
* **compiler-cli:** add resource inlining to ngc ([#22615](https://github.com/angular/angular/issues/22615)) ([b5be18f](https://github.com/angular/angular/commit/b5be18f))
|
|
||||||
* **compiler-cli:** require node 8 as runtime engine ([#22669](https://github.com/angular/angular/issues/22669)) ([c602563](https://github.com/angular/angular/commit/c602563))
|
|
||||||
* **core:** add task tracking to Testability ([#16863](https://github.com/angular/angular/issues/16863)) ([37fedd0](https://github.com/angular/angular/commit/37fedd0))
|
|
||||||
* **elements:** add polyfill for elements es5 shim ([#22413](https://github.com/angular/angular/issues/22413)) ([863aff1](https://github.com/angular/angular/commit/863aff1))
|
|
||||||
* **elements:** add support for creating custom elements ([#22413](https://github.com/angular/angular/issues/22413)) ([22b96b9](https://github.com/angular/angular/commit/22b96b9))
|
|
||||||
* **elements:** add tests for component factory strategy ([#22413](https://github.com/angular/angular/issues/22413)) ([d2be675](https://github.com/angular/angular/commit/d2be675))
|
|
||||||
* **elements:** another polyfill solution ([#22413](https://github.com/angular/angular/issues/22413)) ([cf3ff7d](https://github.com/angular/angular/commit/cf3ff7d))
|
|
||||||
* **elements:** fix lint ([#22413](https://github.com/angular/angular/issues/22413)) ([0b45dfa](https://github.com/angular/angular/commit/0b45dfa))
|
|
||||||
* **elements:** fix payload size ([#22413](https://github.com/angular/angular/issues/22413)) ([fe21437](https://github.com/angular/angular/commit/fe21437))
|
|
||||||
* **elements:** fix test ([#22413](https://github.com/angular/angular/issues/22413)) ([44f637a](https://github.com/angular/angular/commit/44f637a))
|
|
||||||
* **elements:** George's comments ([#22413](https://github.com/angular/angular/issues/22413)) ([46efd4b](https://github.com/angular/angular/commit/46efd4b))
|
|
||||||
* **elements:** injector create ([#22413](https://github.com/angular/angular/issues/22413)) ([87f60bc](https://github.com/angular/angular/commit/87f60bc))
|
|
||||||
* **elements:** make bazel happy ([#22413](https://github.com/angular/angular/issues/22413)) ([39a12d2](https://github.com/angular/angular/commit/39a12d2))
|
|
||||||
* **elements:** provide type, not factory; remove config need ([#22413](https://github.com/angular/angular/issues/22413)) ([1936808](https://github.com/angular/angular/commit/1936808))
|
|
||||||
* **elements:** rebase ([#22413](https://github.com/angular/angular/issues/22413)) ([d72f445](https://github.com/angular/angular/commit/d72f445))
|
|
||||||
* **elements:** remove attribute/input from config ([#22413](https://github.com/angular/angular/issues/22413)) ([688096b](https://github.com/angular/angular/commit/688096b))
|
|
||||||
* **elements:** rename API to createCustomElement ([#22413](https://github.com/angular/angular/issues/22413)) ([167fdf7](https://github.com/angular/angular/commit/167fdf7))
|
|
||||||
* **elements:** update package.json with latest ([#22413](https://github.com/angular/angular/issues/22413)) ([2e450f6](https://github.com/angular/angular/commit/2e450f6))
|
|
||||||
* mark angular packages as side-effect free ([#22785](https://github.com/angular/angular/issues/22785)) ([44de10e](https://github.com/angular/angular/commit/44de10e))
|
|
||||||
* tree-shakeable providers API updates ([#22655](https://github.com/angular/angular/issues/22655)) ([db56836](https://github.com/angular/angular/commit/db56836))
|
|
||||||
* update tslib to 1.9.0 ([#22667](https://github.com/angular/angular/issues/22667)) ([489fec1](https://github.com/angular/angular/commit/489fec1))
|
|
||||||
|
|
||||||
|
|
||||||
### BREAKING CHANGES
|
### BREAKING CHANGES
|
||||||
|
|
||||||
* **compiler:** The `<template>` tag was deprecated in Angular v4 to avoid collisions (i.e. when
|
* **bazel:** Use of @angular/bazel rules now requires calling ng_setup_workspace() in your WORKSPACE file.
|
||||||
using Web Components).
|
|
||||||
|
|
||||||
This commit removes support for `<template>`. `<ng-template>` should be used
|
For example:
|
||||||
instead.
|
|
||||||
|
local_repository(
|
||||||
|
name = "angular",
|
||||||
|
path = "node_modules/@angular/bazel",
|
||||||
|
)
|
||||||
|
|
||||||
|
load("@angular//:index.bzl", "ng_setup_workspace")
|
||||||
|
|
||||||
|
ng_setup_workspace()
|
||||||
|
|
||||||
|
<a name="6.0.9"></a>
|
||||||
|
## [6.0.9](https://github.com/angular/angular/compare/6.0.8...6.0.9) (2018-07-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
* **common:** format fractional seconds ([#24844](https://github.com/angular/angular/issues/24844)) ([3c93d07](https://github.com/angular/angular/commit/3c93d07)), closes [#24831](https://github.com/angular/angular/issues/24831)
|
||||||
|
|
||||||
|
|
||||||
|
<a name="6.0.8"></a>
|
||||||
|
## [6.0.8](https://github.com/angular/angular/compare/6.0.7...6.0.8) (2018-07-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **common:** do not round factional seconds ([#24831](https://github.com/angular/angular/issues/24831)) ([0746485](https://github.com/angular/angular/commit/0746485)), closes [#24384](https://github.com/angular/angular/issues/24384)
|
||||||
|
* **common:** properly update collection reference in NgForOf ([#24684](https://github.com/angular/angular/issues/24684)) ([9a98de9](https://github.com/angular/angular/commit/9a98de9)), closes [#24155](https://github.com/angular/angular/issues/24155)
|
||||||
|
* **common:** use correct currency format for locale de-AT ([#24658](https://github.com/angular/angular/issues/24658)) ([a92f111](https://github.com/angular/angular/commit/a92f111)), closes [#24609](https://github.com/angular/angular/issues/24609)
|
||||||
|
* **compiler-cli:** Use typescript to resolve modules for metadata ([#22856](https://github.com/angular/angular/issues/22856)) ([7717ff1](https://github.com/angular/angular/commit/7717ff1))
|
||||||
|
* **core:** use addCustomEqualityTester instead of overriding toEqual ([#22983](https://github.com/angular/angular/issues/22983)) ([b8975a9](https://github.com/angular/angular/commit/b8975a9)), closes [#22939](https://github.com/angular/angular/issues/22939)
|
||||||
|
* **language-service:** do not overwrite native `Reflect` ([#24299](https://github.com/angular/angular/issues/24299)) ([de1c44f](https://github.com/angular/angular/commit/de1c44f)), closes [#21420](https://github.com/angular/angular/issues/21420)
|
||||||
|
* **router:** add ability to recover from malformed url ([#23283](https://github.com/angular/angular/issues/23283)) ([2d4f4b5](https://github.com/angular/angular/commit/2d4f4b5)), closes [#21468](https://github.com/angular/angular/issues/21468)
|
||||||
|
* **service-worker:** avoid network requests when looking up hashed resources in cache ([#24127](https://github.com/angular/angular/issues/24127)) ([183b079](https://github.com/angular/angular/commit/183b079))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **core:** add support for ShadowDOM v1 ([#24718](https://github.com/angular/angular/issues/24718)) ([6c55a13](https://github.com/angular/angular/commit/6c55a13))
|
||||||
|
|
||||||
|
<a name="6.0.7"></a>
|
||||||
|
## [6.0.7](https://github.com/angular/angular/compare/6.0.6...6.0.7) (2018-06-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **animations:** set animations styles properly on platform-server ([#24624](https://github.com/angular/angular/issues/24624)) ([0b356d4](https://github.com/angular/angular/commit/0b356d4))
|
||||||
|
* **common:** use correct ICU plural for locale mk ([#24659](https://github.com/angular/angular/issues/24659)) ([64a8584](https://github.com/angular/angular/commit/64a8584))
|
||||||
|
|
||||||
|
<a name="6.0.6"></a>
|
||||||
|
## [6.0.6](https://github.com/angular/angular/compare/6.0.5...6.0.6) (2018-06-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **compiler:** support `.` in import statements. ([#20634](https://github.com/angular/angular/issues/20634)) ([e543c73](https://github.com/angular/angular/commit/e543c73)), closes [#20363](https://github.com/angular/angular/issues/20363)
|
||||||
|
* **core:** Injector correctly honors the @Self flag ([#24520](https://github.com/angular/angular/issues/24520)) ([f5b3661](https://github.com/angular/angular/commit/f5b3661))
|
||||||
|
|
||||||
|
<a name="6.0.5"></a>
|
||||||
|
## [6.0.5](https://github.com/angular/angular/compare/6.0.4...6.0.5) (2018-06-13)
|
||||||
|
|
||||||
|
* **animations:** always render end-state styles for orphaned DOM nodes ([#24236](https://github.com/angular/angular/issues/24236)) ([0139173](https://github.com/angular/angular/commit/0139173))
|
||||||
|
* **bazel:** Allow ng_module to depend on targets w no deps ([#24446](https://github.com/angular/angular/issues/24446)) ([ea3669e](https://github.com/angular/angular/commit/ea3669e))
|
||||||
|
* **docs-infra:** use script nomodule to load IE polyfills, skip other polyfills ([#24317](https://github.com/angular/angular/issues/24317)) ([e876535](https://github.com/angular/angular/commit/e876535)), closes [#23647](https://github.com/angular/angular/issues/23647)
|
||||||
|
* **router:** fix lazy loading of aux routes ([#23459](https://github.com/angular/angular/issues/23459)) ([d20877b](https://github.com/angular/angular/commit/d20877b)), closes [#10981](https://github.com/angular/angular/issues/10981)
|
||||||
|
* **service-worker:** fix `SwPush.unsubscribe()` ([#24162](https://github.com/angular/angular/issues/24162)) ([ea2987c](https://github.com/angular/angular/commit/ea2987c)), closes [#24095](https://github.com/angular/angular/issues/24095)
|
||||||
|
|
||||||
|
<a name="6.0.4"></a>
|
||||||
|
## [6.0.4](https://github.com/angular/angular/compare/6.0.3...6.0.4) (2018-06-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **animations:** Fix browser detection logic ([#24188](https://github.com/angular/angular/issues/24188)) ([c9eb491](https://github.com/angular/angular/commit/c9eb491))
|
||||||
|
* **animations:** retain trigger-state for nodes that are moved around ([#24238](https://github.com/angular/angular/issues/24238)) ([19deca1](https://github.com/angular/angular/commit/19deca1))
|
||||||
|
* **forms:** properly handle special properties in FormGroup.get ([#22249](https://github.com/angular/angular/issues/22249)) ([dc3e8aa](https://github.com/angular/angular/commit/dc3e8aa)), closes [#17195](https://github.com/angular/angular/issues/17195)
|
||||||
|
* **platform-server:** avoid clash between server and client style encapsulation attributes ([#24158](https://github.com/angular/angular/issues/24158)) ([e9f2203](https://github.com/angular/angular/commit/e9f2203))
|
||||||
|
* **platform-server:** avoid dependency cycle when using http interceptor ([#24229](https://github.com/angular/angular/issues/24229)) ([2991b1b](https://github.com/angular/angular/commit/2991b1b)), closes [#23023](https://github.com/angular/angular/issues/23023)
|
||||||
|
* **platform-server:** don't reflect innerHTML property to attibute ([#24213](https://github.com/angular/angular/issues/24213)) ([c17098d](https://github.com/angular/angular/commit/c17098d)), closes [#19278](https://github.com/angular/angular/issues/19278)
|
||||||
|
* **platform-server:** provide Domino DOM types globally ([#24116](https://github.com/angular/angular/issues/24116)) ([906b3ec](https://github.com/angular/angular/commit/906b3ec)), closes [#23280](https://github.com/angular/angular/issues/23280) [#23133](https://github.com/angular/angular/issues/23133)
|
||||||
|
|
||||||
|
|
||||||
|
<a name="6.0.3"></a>
|
||||||
|
## [6.0.3](https://github.com/angular/angular/compare/6.0.2...6.0.3) (2018-05-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **service-worker:** check platformBrowser before accessing navigator.serviceWorker ([#21231](https://github.com/angular/angular/issues/21231)) ([0ee5b7e](https://github.com/angular/angular/commit/0ee5b7e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="6.0.2"></a>
|
||||||
|
## [6.0.2](https://github.com/angular/angular/compare/6.0.1...6.0.2) (2018-05-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **animations:** do not throw errors when a destroyed component is animated ([#23836](https://github.com/angular/angular/issues/23836)) ([752b83a](https://github.com/angular/angular/commit/752b83a))
|
||||||
|
* **service-worker:** deprecate `versionedFiles` in asset-group resources ([#23584](https://github.com/angular/angular/issues/23584)) ([c6b618d](https://github.com/angular/angular/commit/c6b618d))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="6.0.1"></a>
|
||||||
|
# [6.0.1](https://github.com/angular/angular/compare/6.0.0...6.0.1) (2018-05-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **animations:** properly clean up queried element styles in safari/edge ([#23686](https://github.com/angular/angular/issues/23686)) ([3824e3f](https://github.com/angular/angular/commit/3824e3f))
|
||||||
|
* **animations:** retain state styling for nodes that are moved around ([#23686](https://github.com/angular/angular/issues/23686)) ([05aa5e0](https://github.com/angular/angular/commit/05aa5e0))
|
||||||
|
* **core:** call ngOnDestroy on all services that have it ([#23755](https://github.com/angular/angular/issues/23755)) ([5581e97](https://github.com/angular/angular/commit/5581e97)), closes [#22466](https://github.com/angular/angular/issues/22466) [#22240](https://github.com/angular/angular/issues/22240) [#14818](https://github.com/angular/angular/issues/14818)
|
||||||
|
* **elements:** always check to create strategy ([#23825](https://github.com/angular/angular/issues/23825)) ([d280077](https://github.com/angular/angular/commit/d280077))
|
||||||
|
* **router:** avoid freezing queryParams in-place ([#22663](https://github.com/angular/angular/issues/22663)) ([3d8799b](https://github.com/angular/angular/commit/3d8799b)), closes [#22617](https://github.com/angular/angular/issues/22617)
|
||||||
|
* **router:** correct the segment parsing so it won't break on ampersand ([#23684](https://github.com/angular/angular/issues/23684)) ([8733843](https://github.com/angular/angular/commit/8733843))
|
||||||
|
* **service-worker:** correctly handle requests with empty `clientId` ([#23625](https://github.com/angular/angular/issues/23625)) ([2254ac2](https://github.com/angular/angular/commit/2254ac2)), closes [#23526](https://github.com/angular/angular/issues/23526)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="6.0.0"></a>
|
||||||
|
# [6.0.0](https://github.com/angular/angular/compare/6.0.0-beta.0...6.0.0) (2018-05-03)
|
||||||
|
|
||||||
|
### Release Highlights & Update instructions
|
||||||
|
|
||||||
|
Angular v6 is the first release of Angular that unifies the Framework, Material and CLI.
|
||||||
|
|
||||||
|
To learn about the release highlights and our new CLI-powered update workflow for your projects please check out the [v6 release announcement](https://blog.angular.io/version-6-0-0-of-angular-now-available-cc56b0efa7a4).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Dependency updates
|
||||||
|
|
||||||
|
* @angular/core now depends on
|
||||||
|
* TypeScript 2.7
|
||||||
|
* RxJS 6.0.0
|
||||||
|
* tslib 1.9.0
|
||||||
|
* @angular/platform-server now depends on Domino 2.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Small Features
|
||||||
|
|
||||||
|
* **animations:** only use the WA-polyfill alongside AnimationBuilder ([#22143](https://github.com/angular/angular/issues/22143)) ([b2f366b](https://github.com/angular/angular/commit/b2f366b)), closes [#17496](https://github.com/angular/angular/issues/17496)
|
||||||
|
* **animations:** expose `element` and `params` within transition matchers ([#22693](https://github.com/angular/angular/issues/22693)) ([58b94e6](https://github.com/angular/angular/commit/58b94e6))
|
||||||
|
* **common:** better error message when non-template element used in NgIf ([#22274](https://github.com/angular/angular/issues/22274)) ([67cf11d](https://github.com/angular/angular/commit/67cf11d)), closes [#16410](https://github.com/angular/angular/issues/16410)
|
||||||
|
* **common:** export functions to format numbers, percents, currencies & dates ([#22423](https://github.com/angular/angular/issues/22423)) ([4180912](https://github.com/angular/angular/commit/4180912)), closes [#20536](https://github.com/angular/angular/issues/20536)
|
||||||
|
* **compiler:** lower @NgModule ids if needed ([#23031](https://github.com/angular/angular/issues/23031)) ([bd024c0](https://github.com/angular/angular/commit/bd024c0))
|
||||||
|
* **compiler:** implement "enableIvy" compiler option ([#21427](https://github.com/angular/angular/issues/21427)) ([64d16de](https://github.com/angular/angular/commit/64d16de))
|
||||||
|
* **compiler:** mark @NgModules in provider lists for identification at runtime ([#22005](https://github.com/angular/angular/issues/22005)) ([2d5e7d1](https://github.com/angular/angular/commit/2d5e7d1))
|
||||||
|
* **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:** support for singleline, multiline & jsdoc comments ([#22715](https://github.com/angular/angular/issues/22715)) ([3b167be](https://github.com/angular/angular/commit/3b167be))
|
||||||
|
* **compiler-cli:** lower loadChildren fields to allow dynamic module paths ([#23088](https://github.com/angular/angular/issues/23088)) ([550433a](https://github.com/angular/angular/commit/550433a))
|
||||||
|
* **compiler-cli:** check unvalidated combination of ngc and TypeScript ([#22293](https://github.com/angular/angular/issues/22293)) ([3ceee99](https://github.com/angular/angular/commit/3ceee99)), closes [#20669](https://github.com/angular/angular/issues/20669)
|
||||||
|
* **compiler-cli:** reflect static methods added to classes in metadata ([#21926](https://github.com/angular/angular/issues/21926)) ([eb8ddd2](https://github.com/angular/angular/commit/eb8ddd2))
|
||||||
|
* **compiler-cli:** Check unvalidated combination of ngc and TypeScript ([#22293](https://github.com/angular/angular/issues/22293)) ([3ceee99](https://github.com/angular/angular/commit/3ceee99)), closes [#20669](https://github.com/angular/angular/issues/20669)
|
||||||
|
* **compiler-cli:** add resource inlining to ngc ([#22615](https://github.com/angular/angular/issues/22615)) ([b5be18f](https://github.com/angular/angular/commit/b5be18f))
|
||||||
|
* **compiler-cli:** require node 8 as runtime engine ([#22669](https://github.com/angular/angular/issues/22669)) ([c602563](https://github.com/angular/angular/commit/c602563))
|
||||||
|
* **core:** add binding name to content changed error ([#20352](https://github.com/angular/angular/issues/20352)) ([d3bf54b](https://github.com/angular/angular/commit/d3bf54b))
|
||||||
|
* **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)
|
||||||
|
* **core:** set `preserveWhitespaces` to false by default ([#22046](https://github.com/angular/angular/issues/22046)) ([f1a0632](https://github.com/angular/angular/commit/f1a0632)), closes [#22027](https://github.com/angular/angular/issues/22027)
|
||||||
|
* **core:** support metadata reflection for native class types ([#22356](https://github.com/angular/angular/issues/22356)) ([5c89d6b](https://github.com/angular/angular/commit/5c89d6b)), closes [#21731](https://github.com/angular/angular/issues/21731)
|
||||||
|
* **core:** change @Injectable() to support tree-shakeable tokens ([#22005](https://github.com/angular/angular/issues/22005)) ([235a235](https://github.com/angular/angular/commit/235a235))
|
||||||
|
* **core:** support metadata reflection for native class types ([#22356](https://github.com/angular/angular/issues/22356)) ([b7544cc](https://github.com/angular/angular/commit/b7544cc)), closes [#21731](https://github.com/angular/angular/issues/21731)
|
||||||
|
* **core:** allow direct scoping of @Injectables to the root injector ([#22185](https://github.com/angular/angular/issues/22185)) ([7ac34e4](https://github.com/angular/angular/commit/7ac34e4))
|
||||||
|
* **core:** add task tracking to Testability ([#16863](https://github.com/angular/angular/issues/16863)) ([37fedd0](https://github.com/angular/angular/commit/37fedd0))
|
||||||
|
* **forms:** handle string with and without line boundary on pattern validator ([#19256](https://github.com/angular/angular/issues/19256)) ([54bf179](https://github.com/angular/angular/commit/54bf179))
|
||||||
|
* **forms:** multiple validators for array method ([#20766](https://github.com/angular/angular/issues/20766)) ([941e88f](https://github.com/angular/angular/commit/941e88f)), closes [#20665](https://github.com/angular/angular/issues/20665)
|
||||||
|
* **forms:** allow markAsPending to emit events ([#20212](https://github.com/angular/angular/issues/20212)) ([e86b64b](https://github.com/angular/angular/commit/e86b64b)), closes [#17958](https://github.com/angular/angular/issues/17958)
|
||||||
|
* **platform-browser:** add token marking which the type of animation module nearest in the injector tree ([#23075](https://github.com/angular/angular/issues/23075)) ([b551f84](https://github.com/angular/angular/commit/b551f84))
|
||||||
|
* **platform-browser:** do not throw error when Hammer.js not loaded ([#22257](https://github.com/angular/angular/issues/22257)) ([991300b](https://github.com/angular/angular/commit/991300b)), closes [#16992](https://github.com/angular/angular/issues/16992)
|
||||||
|
* **platform-browser:** fix [#19604](https://github.com/angular/angular/issues/19604), can config hammerOptions ([#21979](https://github.com/angular/angular/issues/21979)) ([1d571b2](https://github.com/angular/angular/commit/1d571b2))
|
||||||
|
* **platform-server:** bump Domino to v2.0 ([#22411](https://github.com/angular/angular/issues/22411)) ([d3827a0](https://github.com/angular/angular/commit/d3827a0))
|
||||||
|
* **router:** add navigationSource and restoredState to NavigationStart event ([#21728](https://github.com/angular/angular/issues/21728)) ([c40ae7f](https://github.com/angular/angular/commit/c40ae7f))
|
||||||
|
* **service-worker:** add support for configuring navigations URLs ([#23339](https://github.com/angular/angular/issues/23339)) ([08325aa](https://github.com/angular/angular/commit/08325aa)), closes [#20404](https://github.com/angular/angular/issues/20404)
|
||||||
|
* **service-worker:** add helper script which will uninstall SW ([#21863](https://github.com/angular/angular/issues/21863)) ([b10540a](https://github.com/angular/angular/commit/b10540a))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **animations:** report correct totalTime value even during noOp animations ([#22225](https://github.com/angular/angular/issues/22225)) ([e1bf067](https://github.com/angular/angular/commit/e1bf067))
|
||||||
|
* **animations:** avoid animation insertions during router back/refresh ([#21977](https://github.com/angular/angular/issues/21977)) ([f88fba0](https://github.com/angular/angular/commit/f88fba0)), closes [#19712](https://github.com/angular/angular/issues/19712)
|
||||||
|
* **animations:** treat numeric state name values as strings ([#22923](https://github.com/angular/angular/issues/22923)) ([e5e1b0d](https://github.com/angular/angular/commit/e5e1b0d))
|
||||||
|
* **animations:** fix increment/decrement aliases example ([#18323](https://github.com/angular/angular/issues/18323)) ([d2aa8ac](https://github.com/angular/angular/commit/d2aa8ac))
|
||||||
|
* **common:** NgClass should properly take className changes into account ([#21937](https://github.com/angular/angular/issues/21937)) ([4a42669](https://github.com/angular/angular/commit/4a42669)), closes [#21932](https://github.com/angular/angular/issues/21932)
|
||||||
|
* **common:** fix the titlecase pipe ([#22600](https://github.com/angular/angular/issues/22600)) ([7966744](https://github.com/angular/angular/commit/7966744))
|
||||||
|
* **common:** add locale currency values ([#21783](https://github.com/angular/angular/issues/21783)) ([420cc7a](https://github.com/angular/angular/commit/420cc7a)), closes [#20385](https://github.com/angular/angular/issues/20385)
|
||||||
|
* **common:** round currencies based on decimal digits in `CurrencyPipe` ([#21783](https://github.com/angular/angular/issues/21783)) ([44154e7](https://github.com/angular/angular/commit/44154e7)), closes [#10189](https://github.com/angular/angular/issues/10189)
|
||||||
|
* **common:** weaken AsyncPipe transform signature ([#22169](https://github.com/angular/angular/issues/22169)) ([be59c3a](https://github.com/angular/angular/commit/be59c3a))
|
||||||
|
* **common:** http testing library should not convert null to a string when flushing a mock request ([#21417](https://github.com/angular/angular/issues/21417)) ([8b14488](https://github.com/angular/angular/commit/8b14488)), closes [#20744](https://github.com/angular/angular/issues/20744)
|
||||||
|
* **common:** correct mapping of Observable methods ([#20518](https://github.com/angular/angular/issues/20518)) ([2639b4b](https://github.com/angular/angular/commit/2639b4b)), closes [#20516](https://github.com/angular/angular/issues/20516)
|
||||||
|
* **common:** then and else template might be set to null ([#22298](https://github.com/angular/angular/issues/22298)) ([8115edc](https://github.com/angular/angular/commit/8115edc))
|
||||||
|
* **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)
|
||||||
|
* **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)
|
||||||
|
* **common:** set correct timezone for ISO8601 dates in Safari ([#21506](https://github.com/angular/angular/issues/21506)) ([05208b8](https://github.com/angular/angular/commit/05208b8)), closes [#21491](https://github.com/angular/angular/issues/21491)
|
||||||
|
* **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:** avoid a crash in ngc-wrapped. ([#23468](https://github.com/angular/angular/issues/23468)) ([0bc8443](https://github.com/angular/angular/commit/0bc8443))
|
||||||
|
* **compiler:** handle undefined annotation metadata ([#23349](https://github.com/angular/angular/issues/23349)) ([b9431e8](https://github.com/angular/angular/commit/b9431e8))
|
||||||
|
* **compiler:** don't typecheck all inputs ([#22899](https://github.com/angular/angular/issues/22899)) ([838a610](https://github.com/angular/angular/commit/838a610))
|
||||||
|
* **compiler:** fix support for html-like text in translatable attributes ([#23053](https://github.com/angular/angular/issues/23053)) ([28058b7](https://github.com/angular/angular/commit/28058b7))
|
||||||
|
* **compiler:** take quoting into account when determining if object literals can be shared ([#22942](https://github.com/angular/angular/issues/22942)) ([d98e9e7](https://github.com/angular/angular/commit/d98e9e7))
|
||||||
|
* **compiler:** do not emit line/char in ngsummary files. ([#22840](https://github.com/angular/angular/issues/22840)) ([5c387a7](https://github.com/angular/angular/commit/5c387a7))
|
||||||
|
* **compiler:** make unary plus operator consistent to JavaScript ([#22154](https://github.com/angular/angular/issues/22154)) ([72f8abd](https://github.com/angular/angular/commit/72f8abd)), closes [#22089](https://github.com/angular/angular/issues/22089)
|
||||||
|
* **compiler:** allow tree-shakeable injectables to depend on string tokens ([#22376](https://github.com/angular/angular/issues/22376)) ([dd53447](https://github.com/angular/angular/commit/dd53447))
|
||||||
|
* **compiler:** don't strip `/*# sourceURL ... */` ([#16088](https://github.com/angular/angular/issues/16088)) ([5f681f9](https://github.com/angular/angular/commit/5f681f9))
|
||||||
|
* **compiler:** cache external reference resolution ([#21359](https://github.com/angular/angular/issues/21359)) ([e3e2fc0](https://github.com/angular/angular/commit/e3e2fc0))
|
||||||
|
* **compiler:** make `.ngsummary.json` files idempotent ([#21448](https://github.com/angular/angular/issues/21448)) ([e64b1e9](https://github.com/angular/angular/commit/e64b1e9))
|
||||||
|
* **compiler-cli:** shorten resolved module name in fileNameToModuleName to npm package name for typings ([#23231](https://github.com/angular/angular/issues/23231)) ([6199ea5](https://github.com/angular/angular/commit/6199ea5))
|
||||||
|
* **compiler-cli:** strictMetadataEmit should not break on non-compliant libraries ([#23275](https://github.com/angular/angular/issues/23275)) ([5814355](https://github.com/angular/angular/commit/5814355)), closes [#22210](https://github.com/angular/angular/issues/22210)
|
||||||
|
* **compiler-cli:** flat module index metadata should be transformed ([#23129](https://github.com/angular/angular/issues/23129)) ([f99cb5c](https://github.com/angular/angular/commit/f99cb5c))
|
||||||
|
* **compiler-cli:** use numeric comparison for TypeScript version ([#22705](https://github.com/angular/angular/issues/22705)) ([193737a](https://github.com/angular/angular/commit/193737a)), closes [#22593](https://github.com/angular/angular/issues/22593)
|
||||||
|
* **compiler-cli:** disableTypeScriptVersionCheck should be applied even for older tsc versions ([#22669](https://github.com/angular/angular/issues/22669)) ([3f70aba](https://github.com/angular/angular/commit/3f70aba))
|
||||||
|
* **compiler-cli:** emit correct css string escape sequences ([#22776](https://github.com/angular/angular/issues/22776)) ([6e5e819](https://github.com/angular/angular/commit/6e5e819))
|
||||||
|
* **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))
|
||||||
|
* **core:** fix [#20582](https://github.com/angular/angular/issues/20582), don't need to wrap zone in location change listener ([#20640](https://github.com/angular/angular/issues/20640)) ([f791e9f](https://github.com/angular/angular/commit/f791e9f))
|
||||||
|
* **core:** fix proper propagation of subscriptions in EventEmitter ([#22016](https://github.com/angular/angular/issues/22016)) ([e81606c](https://github.com/angular/angular/commit/e81606c)), closes [#21999](https://github.com/angular/angular/issues/21999)
|
||||||
|
* **core:** fix chained http call ([#20924](https://github.com/angular/angular/issues/20924)) ([7e3f9a4](https://github.com/angular/angular/commit/7e3f9a4)), closes [#20921](https://github.com/angular/angular/issues/20921)
|
||||||
|
* **core:** should check Zone existence when scheduleMicroTask ([#20656](https://github.com/angular/angular/issues/20656)) ([3a86940](https://github.com/angular/angular/commit/3a86940))
|
||||||
|
* **core:** avoid eager providers re-initialization ([#23559](https://github.com/angular/angular/issues/23559)) ([697b6c0](https://github.com/angular/angular/commit/697b6c0))
|
||||||
|
* **core:** add stacktrace in log when error during cleanup component in TestBed ([#22162](https://github.com/angular/angular/issues/22162)) ([16d1700](https://github.com/angular/angular/commit/16d1700))
|
||||||
|
* **core:** ensure initial value of QueryList length ([#21980](https://github.com/angular/angular/issues/21980)) ([#21982](https://github.com/angular/angular/issues/21982)) ([e56de10](https://github.com/angular/angular/commit/e56de10)), closes [#21980](https://github.com/angular/angular/issues/21980)
|
||||||
|
* **core:** use appropriate inert document strategy for Firefox & Safari ([#17019](https://github.com/angular/angular/issues/17019)) ([a751649](https://github.com/angular/angular/commit/a751649))
|
||||||
|
* **core:** properly handle function without prototype in reflector ([#22284](https://github.com/angular/angular/issues/22284)) ([a7ebf5a](https://github.com/angular/angular/commit/a7ebf5a)), closes [#19978](https://github.com/angular/angular/issues/19978)
|
||||||
|
* **core:** require factory to be provided for shakeable InjectionToken ([#22207](https://github.com/angular/angular/issues/22207)) ([f755db7](https://github.com/angular/angular/commit/f755db7)), closes [#22205](https://github.com/angular/angular/issues/22205)
|
||||||
|
* **core:** remove core animation import symbols ([#22692](https://github.com/angular/angular/issues/22692)) ([f5a98f4](https://github.com/angular/angular/commit/f5a98f4))
|
||||||
|
* **forms:** improve error message for invalid value accessors ([#22731](https://github.com/angular/angular/issues/22731)) ([23cc3ef](https://github.com/angular/angular/commit/23cc3ef))
|
||||||
|
* **forms:** make Validators.email support optional controls ([#20869](https://github.com/angular/angular/issues/20869)) ([140e7c0](https://github.com/angular/angular/commit/140e7c0))
|
||||||
|
* **forms:** prevent event emission on enable/disable when emitEvent is false ([#12366](https://github.com/angular/angular/issues/12366)) ([#21018](https://github.com/angular/angular/issues/21018)) ([0bcfae7](https://github.com/angular/angular/commit/0bcfae7))
|
||||||
|
* **forms:** set state before emitting a value from ngModelChange ([#21514](https://github.com/angular/angular/issues/21514)) ([9744a1c](https://github.com/angular/angular/commit/9744a1c)), closes [#21513](https://github.com/angular/angular/issues/21513)
|
||||||
|
* **forms:** publish missing types ([#19941](https://github.com/angular/angular/issues/19941)) ([2707012](https://github.com/angular/angular/commit/2707012))
|
||||||
|
* **forms:** set state before emitting a value from ngModelChange ([#21514](https://github.com/angular/angular/issues/21514)) ([3e6a86f](https://github.com/angular/angular/commit/3e6a86f)), closes [#21513](https://github.com/angular/angular/issues/21513)
|
||||||
|
* **language-service:** Clear caches when program changes ([#21337](https://github.com/angular/angular/issues/21337)) ([43e1520](https://github.com/angular/angular/commit/43e1520)), closes [#19405](https://github.com/angular/angular/issues/19405)
|
||||||
|
* **platform-browser:** add @Injectable where it was missing ([#22005](https://github.com/angular/angular/issues/22005)) ([0a1a397](https://github.com/angular/angular/commit/0a1a397))
|
||||||
|
* **platform-browser:** support 0/false/null values in transfer_state ([#22179](https://github.com/angular/angular/issues/22179)) ([6435ecd](https://github.com/angular/angular/commit/6435ecd))
|
||||||
|
* **platform-browser:** do not throw error when Hammer.js not loaded ([#22257](https://github.com/angular/angular/issues/22257)) ([991300b](https://github.com/angular/angular/commit/991300b)), closes [#16992](https://github.com/angular/angular/issues/16992)
|
||||||
|
* **platform-browser:** fix [#19604](https://github.com/angular/angular/issues/19604), can config hammerOptions ([#21979](https://github.com/angular/angular/issues/21979)) ([1d571b2](https://github.com/angular/angular/commit/1d571b2))
|
||||||
|
* **platform-server:** require node v8+ ([#23331](https://github.com/angular/angular/issues/23331)) ([bbfa1d3](https://github.com/angular/angular/commit/bbfa1d3))
|
||||||
|
* **platform-server:** generate correct stylings for camel case names ([#22263](https://github.com/angular/angular/issues/22263)) ([40ba009](https://github.com/angular/angular/commit/40ba009)), closes [#19235](https://github.com/angular/angular/issues/19235)
|
||||||
|
* **platform-server:** add styles to elements correctly ([#22527](https://github.com/angular/angular/issues/22527)) ([cd2ebd2](https://github.com/angular/angular/commit/cd2ebd2))
|
||||||
|
* **router:** cache route handle if found ([#22475](https://github.com/angular/angular/issues/22475)) ([d8de648](https://github.com/angular/angular/commit/d8de648)), closes [#22474](https://github.com/angular/angular/issues/22474)
|
||||||
|
* **router:** don't use spread operator to workaround an issue in closure compiler ([#22884](https://github.com/angular/angular/issues/22884)) ([e6c731f](https://github.com/angular/angular/commit/e6c731f))
|
||||||
|
* **router:** make locationSyncBootstrapListener public due to change in output after TS 2.7 update in [#22669](https://github.com/angular/angular/issues/22669) ([#22896](https://github.com/angular/angular/issues/22896)) ([623d769](https://github.com/angular/angular/commit/623d769))
|
||||||
|
* **router:** correct over-encoding of URL fragment ([#22687](https://github.com/angular/angular/issues/22687)) ([0bf6fa5](https://github.com/angular/angular/commit/0bf6fa5))
|
||||||
|
* **router:** don't mutate route configs ([#22358](https://github.com/angular/angular/issues/22358)) ([45eff4c](https://github.com/angular/angular/commit/45eff4c)), closes [#22203](https://github.com/angular/angular/issues/22203)
|
||||||
|
* **router:** fix URL serialization so special characters are only encoded where needed ([#22337](https://github.com/angular/angular/issues/22337)) ([094666d](https://github.com/angular/angular/commit/094666d)), closes [#10280](https://github.com/angular/angular/issues/10280)
|
||||||
|
* **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)
|
||||||
|
* **service-worker:** add badge to NOTIFICATION_OPTION_NAMES ([#23241](https://github.com/angular/angular/issues/23241)) ([fb59b2d](https://github.com/angular/angular/commit/fb59b2d)), closes [#23196](https://github.com/angular/angular/issues/23196)
|
||||||
|
* **service-worker:** let `*` match 0 characters in globs ([#23339](https://github.com/angular/angular/issues/23339)) ([6c2c958](https://github.com/angular/angular/commit/6c2c958))
|
||||||
|
* **service-worker:** do not enter degraded mode when offline ([#22883](https://github.com/angular/angular/issues/22883)) ([9e9b8dd](https://github.com/angular/angular/commit/9e9b8dd)), closes [#21636](https://github.com/angular/angular/issues/21636)
|
||||||
|
* **service-worker:** fix LruList bugs ([#22769](https://github.com/angular/angular/issues/22769)) ([8c2a578](https://github.com/angular/angular/commit/8c2a578)), closes [#22218](https://github.com/angular/angular/issues/22218) [#22768](https://github.com/angular/angular/issues/22768)
|
||||||
|
* **service-worker:** ignore invalid `only-if-cached` requests ([#22883](https://github.com/angular/angular/issues/22883)) ([d9dc46e](https://github.com/angular/angular/commit/d9dc46e)), closes [#22362](https://github.com/angular/angular/issues/22362)
|
||||||
|
* **service-worker:** properly handle invalid hashes in all scenarios ([#21288](https://github.com/angular/angular/issues/21288)) ([3951098](https://github.com/angular/angular/commit/3951098))
|
||||||
|
* **upgrade:** correctly handle downgraded `OnPush` components ([#22209](https://github.com/angular/angular/issues/22209)) ([ad9ce5c](https://github.com/angular/angular/commit/ad9ce5c)), closes [#14286](https://github.com/angular/angular/issues/14286)
|
||||||
|
* **upgrade:** propagate return value of resumeBootstrap ([#22754](https://github.com/angular/angular/issues/22754)) ([a2330ff](https://github.com/angular/angular/commit/a2330ff)), closes [#22723](https://github.com/angular/angular/issues/22723)
|
||||||
|
* **upgrade:** two-way binding and listening for event ([#22772](https://github.com/angular/angular/issues/22772)) ([2b3de63](https://github.com/angular/angular/commit/2b3de63)), closes [#22734](https://github.com/angular/angular/issues/22734)
|
||||||
|
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([8a85888](https://github.com/angular/angular/commit/8a85888)), closes [#22392](https://github.com/angular/angular/issues/22392)
|
||||||
|
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([f089bf5](https://github.com/angular/angular/commit/f089bf5))
|
||||||
|
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([13ab91e](https://github.com/angular/angular/commit/13ab91e)), closes [#22175](https://github.com/angular/angular/issues/22175)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Possible Breaking Changes
|
||||||
|
|
||||||
|
* **animations:** When animation is triggered within a disabled zone, the associated event (which an instance of AnimationEvent) will no longer report the totalTime as 0 (it will emit the actual time of the animation).
|
||||||
|
|
||||||
|
To detect if an animation event is reporting a disabled animation then the `event.disabled` property can be used instead.
|
||||||
|
|
||||||
|
|
||||||
|
* **compiler:** The `<template>` tag was deprecated in Angular v4 to avoid collisions (i.e. when using Web Components).
|
||||||
|
|
||||||
|
This change removes support for `<template>`. `<ng-template>` should be used instead.
|
||||||
|
|
||||||
BEFORE:
|
BEFORE:
|
||||||
|
|
||||||
@ -244,153 +389,15 @@ AFTER:
|
|||||||
|
|
||||||
<!-- html template -->
|
<!-- html template -->
|
||||||
<ng-template>some template content</ng-template>
|
<ng-template>some template content</ng-template>
|
||||||
* **core:** it is no longer possible to import
|
|
||||||
animation-related functions from @angular/core. All
|
|
||||||
animation symbols must now be imported from @angular/animations.
|
|
||||||
* after this change, npm and yarn will issue incompatible peerDependencies warning
|
|
||||||
|
|
||||||
We don't expect this to actually break an application, but the application/library package.json
|
* **core:** it is no longer possible to import animation-related functions from @angular/core. All animation symbols must now be imported from @angular/animations.
|
||||||
will need to be updated to provide tslib 1.9.0 or higher.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="5.2.9"></a>
|
|
||||||
## [5.2.9](https://github.com/angular/angular/compare/5.2.8...5.2.9) (2018-03-14)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **platform-server:** add styles to elements correctly ([#22527](https://github.com/angular/angular/issues/22527)) ([fc6dfc2](https://github.com/angular/angular/commit/fc6dfc2))
|
|
||||||
* **router:** correct over-encoding of URL fragment ([#22687](https://github.com/angular/angular/issues/22687)) ([86517f2](https://github.com/angular/angular/commit/86517f2))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="6.0.0-beta.7"></a>
|
|
||||||
# [6.0.0-beta.7](https://github.com/angular/angular/compare/6.0.0-beta.6...6.0.0-beta.7) (2018-03-07)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** fixes for ng_package on Windows ([#22597](https://github.com/angular/angular/issues/22597)) ([4c40812](https://github.com/angular/angular/commit/4c40812))
|
|
||||||
* **compiler:** allow tree-shakeable injectables to depend on string tokens ([#22376](https://github.com/angular/angular/issues/22376)) ([dd53447](https://github.com/angular/angular/commit/dd53447))
|
|
||||||
* **router:** fix URL serialization so special characters are only encoded where needed ([#22337](https://github.com/angular/angular/issues/22337)) ([fa974c7](https://github.com/angular/angular/commit/fa974c7)), closes [#10280](https://github.com/angular/angular/issues/10280)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="5.2.8"></a>
|
|
||||||
## [5.2.8](https://github.com/angular/angular/compare/5.2.7...5.2.8) (2018-03-07)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **platform-server:** generate correct stylings for camel case names ([#22263](https://github.com/angular/angular/issues/22263)) ([de02a7a](https://github.com/angular/angular/commit/de02a7a)), closes [#19235](https://github.com/angular/angular/issues/19235)
|
|
||||||
* **router:** don't mutate route configs ([#22358](https://github.com/angular/angular/issues/22358)) ([8f0a064](https://github.com/angular/angular/commit/8f0a064)), closes [#22203](https://github.com/angular/angular/issues/22203)
|
|
||||||
* **router:** fix URL serialization so special characters are only encoded where needed ([#22337](https://github.com/angular/angular/issues/22337)) ([789a47e](https://github.com/angular/angular/commit/789a47e)), closes [#10280](https://github.com/angular/angular/issues/10280)
|
|
||||||
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([4aef9de](https://github.com/angular/angular/commit/4aef9de)), closes [#22392](https://github.com/angular/angular/issues/22392)
|
|
||||||
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
|
|
||||||
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([a9a0e27](https://github.com/angular/angular/commit/a9a0e27)), closes [#22175](https://github.com/angular/angular/issues/22175)
|
|
||||||
|
|
||||||
|
|
||||||
<a name="6.0.0-beta.6"></a>
|
|
||||||
# [6.0.0-beta.6](https://github.com/angular/angular/compare/6.0.0-beta.5...6.0.0-beta.6) (2018-02-28)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **animations:** only use the WA-polyfill alongside AnimationBuilder ([#22143](https://github.com/angular/angular/issues/22143)) ([b2f366b](https://github.com/angular/angular/commit/b2f366b)), closes [#17496](https://github.com/angular/angular/issues/17496)
|
|
||||||
* **animations:** report correct totalTime value even during noOp animations ([#22225](https://github.com/angular/angular/issues/22225)) ([e1bf067](https://github.com/angular/angular/commit/e1bf067))
|
|
||||||
* **bazel:** ng_package includes transitive .d.ts and flatModuleMetadata ([#22499](https://github.com/angular/angular/issues/22499)) ([aabe16c](https://github.com/angular/angular/commit/aabe16c)), closes [#22419](https://github.com/angular/angular/issues/22419)
|
|
||||||
* **common:** correct mapping of Observable methods ([#20518](https://github.com/angular/angular/issues/20518)) ([2639b4b](https://github.com/angular/angular/commit/2639b4b)), closes [#20516](https://github.com/angular/angular/issues/20516)
|
|
||||||
* **common:** then and else template might be set to null ([#22298](https://github.com/angular/angular/issues/22298)) ([8115edc](https://github.com/angular/angular/commit/8115edc))
|
|
||||||
* **compiler-cli:** add missing entry point to package, update tsickle ([#22295](https://github.com/angular/angular/issues/22295)) ([28ac244](https://github.com/angular/angular/commit/28ac244))
|
|
||||||
* **core:** export inject() from [@angular](https://github.com/angular)/core ([#22389](https://github.com/angular/angular/issues/22389)) ([f8749bf](https://github.com/angular/angular/commit/f8749bf)), closes [#22388](https://github.com/angular/angular/issues/22388)
|
|
||||||
* **core:** properly handle function without prototype in reflector ([#22284](https://github.com/angular/angular/issues/22284)) ([a7ebf5a](https://github.com/angular/angular/commit/a7ebf5a)), closes [#19978](https://github.com/angular/angular/issues/19978)
|
|
||||||
* **core:** require factory to be provided for shakeable InjectionToken ([#22207](https://github.com/angular/angular/issues/22207)) ([f755db7](https://github.com/angular/angular/commit/f755db7)), closes [#22205](https://github.com/angular/angular/issues/22205)
|
|
||||||
* **forms:** set state before emitting a value from ngModelChange ([#21514](https://github.com/angular/angular/issues/21514)) ([3e6a86f](https://github.com/angular/angular/commit/3e6a86f)), closes [#21513](https://github.com/angular/angular/issues/21513)
|
|
||||||
* **platform-server:** generate correct stylings for camel case names ([#22263](https://github.com/angular/angular/issues/22263)) ([40ba009](https://github.com/angular/angular/commit/40ba009)), closes [#19235](https://github.com/angular/angular/issues/19235)
|
|
||||||
* **router:** don't mutate route configs ([#22358](https://github.com/angular/angular/issues/22358)) ([45eff4c](https://github.com/angular/angular/commit/45eff4c)), closes [#22203](https://github.com/angular/angular/issues/22203)
|
|
||||||
* **router:** fix URL serialization so special characters are only encoded where needed ([#22337](https://github.com/angular/angular/issues/22337)) ([094666d](https://github.com/angular/angular/commit/094666d)), closes [#10280](https://github.com/angular/angular/issues/10280)
|
|
||||||
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([8a85888](https://github.com/angular/angular/commit/8a85888)), closes [#22392](https://github.com/angular/angular/issues/22392)
|
|
||||||
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([f089bf5](https://github.com/angular/angular/commit/f089bf5))
|
|
||||||
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([13ab91e](https://github.com/angular/angular/commit/13ab91e)), closes [#22175](https://github.com/angular/angular/issues/22175)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **bazel:** add an ng_package rule ([#22221](https://github.com/angular/angular/issues/22221)) ([b43b164](https://github.com/angular/angular/commit/b43b164))
|
|
||||||
* **bazel:** introduce a binary stamping feature ([#22176](https://github.com/angular/angular/issues/22176)) ([bba65e0](https://github.com/angular/angular/commit/bba65e0))
|
|
||||||
* **bazel:** ng_module produces bundle index ([#22176](https://github.com/angular/angular/issues/22176)) ([029dbf0](https://github.com/angular/angular/commit/029dbf0))
|
|
||||||
* **bazel:** ng_package adds package.json props ([#22499](https://github.com/angular/angular/issues/22499)) ([b6c9410](https://github.com/angular/angular/commit/b6c9410)), closes [#22416](https://github.com/angular/angular/issues/22416)
|
|
||||||
* **common:** better error message when non-template element used in NgIf ([#22274](https://github.com/angular/angular/issues/22274)) ([67cf11d](https://github.com/angular/angular/commit/67cf11d)), closes [#16410](https://github.com/angular/angular/issues/16410)
|
|
||||||
* **common:** export functions to format numbers, percents, currencies & dates ([#22423](https://github.com/angular/angular/issues/22423)) ([4180912](https://github.com/angular/angular/commit/4180912)), closes [#20536](https://github.com/angular/angular/issues/20536)
|
|
||||||
* **compiler-cli:** Check unvalidated combination of ngc and TypeScript ([#22293](https://github.com/angular/angular/issues/22293)) ([3ceee99](https://github.com/angular/angular/commit/3ceee99)), closes [#20669](https://github.com/angular/angular/issues/20669)
|
|
||||||
* **core:** set preserveWhitespaces to false by default ([#22046](https://github.com/angular/angular/issues/22046)) ([f1a0632](https://github.com/angular/angular/commit/f1a0632)), closes [#22027](https://github.com/angular/angular/issues/22027)
|
|
||||||
* **core:** support metadata reflection for native class types ([#22356](https://github.com/angular/angular/issues/22356)) ([5c89d6b](https://github.com/angular/angular/commit/5c89d6b)), closes [#21731](https://github.com/angular/angular/issues/21731)
|
|
||||||
* **core:** support metadata reflection for native class types ([#22356](https://github.com/angular/angular/issues/22356)) ([b7544cc](https://github.com/angular/angular/commit/b7544cc)), closes [#21731](https://github.com/angular/angular/issues/21731)
|
|
||||||
* **forms:** allow markAsPending to emit events ([#20212](https://github.com/angular/angular/issues/20212)) ([e86b64b](https://github.com/angular/angular/commit/e86b64b)), closes [#17958](https://github.com/angular/angular/issues/17958)
|
|
||||||
* allow direct scoping of @Injectables to the root injector ([#22185](https://github.com/angular/angular/issues/22185)) ([7ac34e4](https://github.com/angular/angular/commit/7ac34e4))
|
|
||||||
* **platform-browser:** do not throw error when Hammer.js not loaded ([#22257](https://github.com/angular/angular/issues/22257)) ([991300b](https://github.com/angular/angular/commit/991300b)), closes [#16992](https://github.com/angular/angular/issues/16992)
|
|
||||||
* **platform-browser:** fix [#19604](https://github.com/angular/angular/issues/19604), can config hammerOptions ([#21979](https://github.com/angular/angular/issues/21979)) ([1d571b2](https://github.com/angular/angular/commit/1d571b2))
|
|
||||||
* **platform-server:** bump Domino to v2.0 ([#22411](https://github.com/angular/angular/issues/22411)) ([d3827a0](https://github.com/angular/angular/commit/d3827a0))
|
|
||||||
|
|
||||||
|
|
||||||
### BREAKING CHANGES
|
|
||||||
|
|
||||||
* **platform-server:** * Bump the dependency on Domino to 2.0 to resolve issues with
|
|
||||||
namespacing
|
|
||||||
* **forms:** - `AbstractControl#statusChanges` now emits an event of `'PENDING'` when you call `AbstractControl#markAsPending`
|
* **forms:** - `AbstractControl#statusChanges` now emits an event of `'PENDING'` when you call `AbstractControl#markAsPending`
|
||||||
- Previously it did not emit an event when you called `markAsPending`
|
- Previously it did not emit an event when you called `markAsPending`
|
||||||
- To migrate you would need to ensure that if you are filtering or checking events from `statusChanges` that you account for the new event when calling `markAsPending`
|
- To migrate you would need to ensure that if you are filtering or checking events from `statusChanges` that you account for the new event when calling `markAsPending`
|
||||||
* **animations:** When animation is trigged within a disabled zone, the
|
|
||||||
associated event (which an instance of AnimationEvent) will no longer
|
|
||||||
report the totalTime as 0 (it will emit the actual time of the
|
|
||||||
animation). To detect if an animation event is reporting a disabled
|
|
||||||
animation then the `event.disabled` property can be used instead.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="5.2.7"></a>
|
|
||||||
## [5.2.7](https://github.com/angular/angular/compare/5.2.6...5.2.7) (2018-02-28)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **platform-server:** generate correct stylings for camel case names ([#22263](https://github.com/angular/angular/issues/22263)) ([de02a7a](https://github.com/angular/angular/commit/de02a7a)), closes [#19235](https://github.com/angular/angular/issues/19235)
|
|
||||||
* **router:** don't mutate route configs ([#22358](https://github.com/angular/angular/issues/22358)) ([8f0a064](https://github.com/angular/angular/commit/8f0a064)), closes [#22203](https://github.com/angular/angular/issues/22203)
|
|
||||||
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([4aef9de](https://github.com/angular/angular/commit/4aef9de)), closes [#22392](https://github.com/angular/angular/issues/22392)
|
|
||||||
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
|
|
||||||
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([a9a0e27](https://github.com/angular/angular/commit/a9a0e27)), closes [#22175](https://github.com/angular/angular/issues/22175)
|
|
||||||
|
|
||||||
<a name="6.0.0-beta.5"></a>
|
|
||||||
# [6.0.0-beta.5](https://github.com/angular/angular/compare/6.0.0-beta.4...6.0.0-beta.5) (2018-02-22)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **animations:** report correct totalTime value even during noOp animations ([#22225](https://github.com/angular/angular/issues/22225)) ([e1bf067](https://github.com/angular/angular/commit/e1bf067))
|
|
||||||
* **common:** correct mapping of Observable methods ([#20518](https://github.com/angular/angular/issues/20518)) ([2639b4b](https://github.com/angular/angular/commit/2639b4b)), closes [#20516](https://github.com/angular/angular/issues/20516)
|
|
||||||
* **common:** then and else template might be set to null ([#22298](https://github.com/angular/angular/issues/22298)) ([8115edc](https://github.com/angular/angular/commit/8115edc))
|
|
||||||
* **compiler-cli:** add missing entry point to package, update tsickle ([#22295](https://github.com/angular/angular/issues/22295)) ([28ac244](https://github.com/angular/angular/commit/28ac244))
|
|
||||||
* **core:** properly handle function without prototype in reflector ([#22284](https://github.com/angular/angular/issues/22284)) ([a7ebf5a](https://github.com/angular/angular/commit/a7ebf5a)), closes [#19978](https://github.com/angular/angular/issues/19978)
|
|
||||||
* **core:** require factory to be provided for shakeable InjectionToken ([#22207](https://github.com/angular/angular/issues/22207)) ([f755db7](https://github.com/angular/angular/commit/f755db7)), closes [#22205](https://github.com/angular/angular/issues/22205)
|
|
||||||
* **forms:** set state before emitting a value from ngModelChange ([#21514](https://github.com/angular/angular/issues/21514)) ([3e6a86f](https://github.com/angular/angular/commit/3e6a86f)), closes [#21513](https://github.com/angular/angular/issues/21513)
|
|
||||||
* **core:** set `preserveWhitespaces` to false by default ([#22046](https://github.com/angular/angular/issues/22046)) ([f1a0632](https://github.com/angular/angular/commit/f1a0632)), closes [#22027](https://github.com/angular/angular/issues/22027)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **common:** better error message when non-template element used in NgIf ([#22274](https://github.com/angular/angular/issues/22274)) ([67cf11d](https://github.com/angular/angular/commit/67cf11d)), closes [#16410](https://github.com/angular/angular/issues/16410)
|
|
||||||
* **compiler-cli:** Check unvalidated combination of ngc and TypeScript ([#22293](https://github.com/angular/angular/issues/22293)) ([3ceee99](https://github.com/angular/angular/commit/3ceee99)), closes [#20669](https://github.com/angular/angular/issues/20669)
|
|
||||||
* **core:** support metadata reflection for native class types ([#22356](https://github.com/angular/angular/issues/22356)) ([5c89d6b](https://github.com/angular/angular/commit/5c89d6b)), closes [#21731](https://github.com/angular/angular/issues/21731)
|
|
||||||
* **platform-browser:** do not throw error when Hammer.js not loaded ([#22257](https://github.com/angular/angular/issues/22257)) ([991300b](https://github.com/angular/angular/commit/991300b)), closes [#16992](https://github.com/angular/angular/issues/16992)
|
|
||||||
* **platform-browser:** fix [#19604](https://github.com/angular/angular/issues/19604), can config hammerOptions ([#21979](https://github.com/angular/angular/issues/21979)) ([1d571b2](https://github.com/angular/angular/commit/1d571b2))
|
|
||||||
|
|
||||||
### BREAKING CHANGES
|
|
||||||
|
|
||||||
* **animations:** When animation is triggered within a disabled zone, the
|
|
||||||
associated event (which an instance of AnimationEvent) will no longer
|
|
||||||
report the totalTime as 0 (it will emit the actual time of the
|
|
||||||
animation). To detect if an animation event is reporting a disabled
|
|
||||||
animation then the `event.disabled` property can be used instead.
|
|
||||||
|
|
||||||
* **forms:** ngModelChange is now emitted after the value/validity is updated on its control.
|
* **forms:** ngModelChange is now emitted after the value/validity is updated on its control.
|
||||||
|
|
||||||
Previously, ngModelChange was emitted before its underlying control was updated.
|
Previously, ngModelChange was emitted before its underlying control was updated.
|
||||||
@ -428,6 +435,79 @@ We think this order will be less confusing when the control is checked directly.
|
|||||||
You will only need to update your app if it has relied on this bug to keep track of the old control value.
|
You will only need to update your app if it has relied on this bug to keep track of the old control value.
|
||||||
If that is the case, you should be able to track the old value directly by saving it on your component.
|
If that is the case, you should be able to track the old value directly by saving it on your component.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="5.2.10"></a>
|
||||||
|
## [5.2.10](https://github.com/angular/angular/compare/5.2.9...5.2.10) (2018-04-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **animations:** avoid animation insertions during router back/refresh ([#21977](https://github.com/angular/angular/issues/21977)) ([641cc49](https://github.com/angular/angular/commit/641cc49)), closes [#19712](https://github.com/angular/angular/issues/19712)
|
||||||
|
* **common:** properly take className changes into account ([#21937](https://github.com/angular/angular/issues/21937)) ([54e9108](https://github.com/angular/angular/commit/54e9108)), closes [#21932](https://github.com/angular/angular/issues/21932)
|
||||||
|
* **compiler:** fix support for html-like text in translatable attributes ([#23053](https://github.com/angular/angular/issues/23053)) ([4f7c369](https://github.com/angular/angular/commit/4f7c369))
|
||||||
|
* **compiler-cli:** emit correct css string escape sequences ([#22776](https://github.com/angular/angular/issues/22776)) ([db0afa9](https://github.com/angular/angular/commit/db0afa9))
|
||||||
|
* **forms:** improve error message for invalid value accessors ([#22731](https://github.com/angular/angular/issues/22731)) ([dd61595](https://github.com/angular/angular/commit/dd61595))
|
||||||
|
* **service-worker:** add badge to NOTIFICATION_OPTION_NAMES ([#23241](https://github.com/angular/angular/issues/23241)) ([7b23983](https://github.com/angular/angular/commit/7b23983)), closes [#23196](https://github.com/angular/angular/issues/23196)
|
||||||
|
* **service-worker:** do not enter degraded mode when offline ([#22883](https://github.com/angular/angular/issues/22883)) ([ae9c25f](https://github.com/angular/angular/commit/ae9c25f)), closes [#21636](https://github.com/angular/angular/issues/21636)
|
||||||
|
* **service-worker:** fix LruList bugs ([#22769](https://github.com/angular/angular/issues/22769)) ([65f8943](https://github.com/angular/angular/commit/65f8943)), closes [#22218](https://github.com/angular/angular/issues/22218) [#22768](https://github.com/angular/angular/issues/22768)
|
||||||
|
* **service-worker:** ignore invalid `only-if-cached` requests ([#22883](https://github.com/angular/angular/issues/22883)) ([0d4fe38](https://github.com/angular/angular/commit/0d4fe38)), closes [#22362](https://github.com/angular/angular/issues/22362)
|
||||||
|
* **upgrade:** correctly handle downgraded `OnPush` components ([#22209](https://github.com/angular/angular/issues/22209)) ([f43fba6](https://github.com/angular/angular/commit/f43fba6)), closes [#14286](https://github.com/angular/angular/issues/14286)
|
||||||
|
* **upgrade:** propagate return value of resumeBootstrap ([#22754](https://github.com/angular/angular/issues/22754)) ([ae76eec](https://github.com/angular/angular/commit/ae76eec)), closes [#22723](https://github.com/angular/angular/issues/22723)
|
||||||
|
* **upgrade:** two-way binding and listening for event ([#22772](https://github.com/angular/angular/issues/22772)) ([5391f96](https://github.com/angular/angular/commit/5391f96)), closes [#22734](https://github.com/angular/angular/issues/22734)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="4.4.7"></a>
|
||||||
|
## [4.4.7](https://github.com/angular/angular/compare/4.4.6...4.4.7) (2018-04-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **core:** use appropriate inert document strategy for Firefox & Safari ([#22077](https://github.com/angular/angular/issues/22077)) ([2c5cf19](https://github.com/angular/angular/commit/2c5cf19))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="5.2.9"></a>
|
||||||
|
## [5.2.9](https://github.com/angular/angular/compare/5.2.8...5.2.9) (2018-03-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **platform-server:** add styles to elements correctly ([#22527](https://github.com/angular/angular/issues/22527)) ([fc6dfc2](https://github.com/angular/angular/commit/fc6dfc2))
|
||||||
|
* **router:** correct over-encoding of URL fragment ([#22687](https://github.com/angular/angular/issues/22687)) ([86517f2](https://github.com/angular/angular/commit/86517f2))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="5.2.8"></a>
|
||||||
|
## [5.2.8](https://github.com/angular/angular/compare/5.2.7...5.2.8) (2018-03-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **platform-server:** generate correct stylings for camel case names ([#22263](https://github.com/angular/angular/issues/22263)) ([de02a7a](https://github.com/angular/angular/commit/de02a7a)), closes [#19235](https://github.com/angular/angular/issues/19235)
|
||||||
|
* **router:** don't mutate route configs ([#22358](https://github.com/angular/angular/issues/22358)) ([8f0a064](https://github.com/angular/angular/commit/8f0a064)), closes [#22203](https://github.com/angular/angular/issues/22203)
|
||||||
|
* **router:** fix URL serialization so special characters are only encoded where needed ([#22337](https://github.com/angular/angular/issues/22337)) ([789a47e](https://github.com/angular/angular/commit/789a47e)), closes [#10280](https://github.com/angular/angular/issues/10280)
|
||||||
|
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([4aef9de](https://github.com/angular/angular/commit/4aef9de)), closes [#22392](https://github.com/angular/angular/issues/22392)
|
||||||
|
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
|
||||||
|
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([a9a0e27](https://github.com/angular/angular/commit/a9a0e27)), closes [#22175](https://github.com/angular/angular/issues/22175)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="5.2.7"></a>
|
||||||
|
## [5.2.7](https://github.com/angular/angular/compare/5.2.6...5.2.7) (2018-02-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **platform-server:** generate correct stylings for camel case names ([#22263](https://github.com/angular/angular/issues/22263)) ([de02a7a](https://github.com/angular/angular/commit/de02a7a)), closes [#19235](https://github.com/angular/angular/issues/19235)
|
||||||
|
* **router:** don't mutate route configs ([#22358](https://github.com/angular/angular/issues/22358)) ([8f0a064](https://github.com/angular/angular/commit/8f0a064)), closes [#22203](https://github.com/angular/angular/issues/22203)
|
||||||
|
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([4aef9de](https://github.com/angular/angular/commit/4aef9de)), closes [#22392](https://github.com/angular/angular/issues/22392)
|
||||||
|
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
|
||||||
|
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([a9a0e27](https://github.com/angular/angular/commit/a9a0e27)), closes [#22175](https://github.com/angular/angular/issues/22175)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="5.2.6"></a>
|
<a name="5.2.6"></a>
|
||||||
## [5.2.6](https://github.com/angular/angular/compare/5.2.5...5.2.6) (2018-02-22)
|
## [5.2.6](https://github.com/angular/angular/compare/5.2.5...5.2.6) (2018-02-22)
|
||||||
|
|
||||||
@ -439,34 +519,7 @@ If that is the case, you should be able to track the old value directly by savin
|
|||||||
* **core:** properly handle function without prototype in reflector ([#22284](https://github.com/angular/angular/issues/22284)) ([5ec38f2](https://github.com/angular/angular/commit/5ec38f2)), closes [#19978](https://github.com/angular/angular/issues/19978)
|
* **core:** properly handle function without prototype in reflector ([#22284](https://github.com/angular/angular/issues/22284)) ([5ec38f2](https://github.com/angular/angular/commit/5ec38f2)), closes [#19978](https://github.com/angular/angular/issues/19978)
|
||||||
* **core:** support metadata reflection for native class types ([#22356](https://github.com/angular/angular/issues/22356)) ([ee91de9](https://github.com/angular/angular/commit/ee91de9)), closes [#21731](https://github.com/angular/angular/issues/21731)
|
* **core:** support metadata reflection for native class types ([#22356](https://github.com/angular/angular/issues/22356)) ([ee91de9](https://github.com/angular/angular/commit/ee91de9)), closes [#21731](https://github.com/angular/angular/issues/21731)
|
||||||
|
|
||||||
<a name="6.0.0-beta.4"></a>
|
|
||||||
# [6.0.0-beta.4](https://github.com/angular/angular/compare/6.0.0-beta.3...6.0.0-beta.4) (2018-02-14)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** allow TS to read ambient typings ([#21876](https://github.com/angular/angular/issues/21876)) ([b081dfe](https://github.com/angular/angular/commit/b081dfe)), closes [#21872](https://github.com/angular/angular/issues/21872)
|
|
||||||
* **bazel:** improve error message for missing assets ([#22096](https://github.com/angular/angular/issues/22096)) ([dcf64a0](https://github.com/angular/angular/commit/dcf64a0)), closes [#22095](https://github.com/angular/angular/issues/22095)
|
|
||||||
* **common:** add locale currency values ([#21783](https://github.com/angular/angular/issues/21783)) ([420cc7a](https://github.com/angular/angular/commit/420cc7a)), closes [#20385](https://github.com/angular/angular/issues/20385)
|
|
||||||
* **common:** round currencies based on decimal digits in `CurrencyPipe` ([#21783](https://github.com/angular/angular/issues/21783)) ([44154e7](https://github.com/angular/angular/commit/44154e7)), closes [#10189](https://github.com/angular/angular/issues/10189)
|
|
||||||
* **common:** weaken AsyncPipe transform signature ([#22169](https://github.com/angular/angular/issues/22169)) ([be59c3a](https://github.com/angular/angular/commit/be59c3a))
|
|
||||||
* **compiler:** make unary plus operator consistent to JavaScript ([#22154](https://github.com/angular/angular/issues/22154)) ([72f8abd](https://github.com/angular/angular/commit/72f8abd)), closes [#22089](https://github.com/angular/angular/issues/22089)
|
|
||||||
* **core:** add stacktrace in log when error during cleanup component in TestBed ([#22162](https://github.com/angular/angular/issues/22162)) ([16d1700](https://github.com/angular/angular/commit/16d1700))
|
|
||||||
* **core:** ensure initial value of QueryList length ([#21980](https://github.com/angular/angular/issues/21980)) ([#21982](https://github.com/angular/angular/issues/21982)) ([e56de10](https://github.com/angular/angular/commit/e56de10)), closes [#21980](https://github.com/angular/angular/issues/21980)
|
|
||||||
* **core:** use appropriate inert document strategy for Firefox & Safari ([#17019](https://github.com/angular/angular/issues/17019)) ([a751649](https://github.com/angular/angular/commit/a751649))
|
|
||||||
* **forms:** make Validators.email support optional controls ([#20869](https://github.com/angular/angular/issues/20869)) ([140e7c0](https://github.com/angular/angular/commit/140e7c0))
|
|
||||||
* **forms:** prevent event emission on enable/disable when emitEvent is false ([#12366](https://github.com/angular/angular/issues/12366)) ([#21018](https://github.com/angular/angular/issues/21018)) ([0bcfae7](https://github.com/angular/angular/commit/0bcfae7))
|
|
||||||
* **forms:** set state before emitting a value from ngModelChange ([#21514](https://github.com/angular/angular/issues/21514)) ([9744a1c](https://github.com/angular/angular/commit/9744a1c)), closes [#21513](https://github.com/angular/angular/issues/21513)
|
|
||||||
* **language-service:** correct instructions to install the language service ([#22000](https://github.com/angular/angular/issues/22000)) ([b37cee3](https://github.com/angular/angular/commit/b37cee3))
|
|
||||||
* **platform-browser:** add @Injectable where it was missing ([#22005](https://github.com/angular/angular/issues/22005)) ([0a1a397](https://github.com/angular/angular/commit/0a1a397))
|
|
||||||
* **platform-browser:** support 0/false/null values in transfer_state ([#22179](https://github.com/angular/angular/issues/22179)) ([6435ecd](https://github.com/angular/angular/commit/6435ecd))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **bazel:** allow explicit specification of factories ([#22003](https://github.com/angular/angular/issues/22003)) ([e442881](https://github.com/angular/angular/commit/e442881))
|
|
||||||
* **compiler:** mark @NgModules in provider lists for identification at runtime ([#22005](https://github.com/angular/angular/issues/22005)) ([2d5e7d1](https://github.com/angular/angular/commit/2d5e7d1))
|
|
||||||
* **forms:** multiple validators for array method ([#20766](https://github.com/angular/angular/issues/20766)) ([941e88f](https://github.com/angular/angular/commit/941e88f)), closes [#20665](https://github.com/angular/angular/issues/20665)
|
|
||||||
* change @Injectable() to support tree-shakeable tokens ([#22005](https://github.com/angular/angular/issues/22005)) ([235a235](https://github.com/angular/angular/commit/235a235))
|
|
||||||
|
|
||||||
<a name="5.2.5"></a>
|
<a name="5.2.5"></a>
|
||||||
## [5.2.5](https://github.com/angular/angular/compare/5.2.4...5.2.5) (2018-02-14)
|
## [5.2.5](https://github.com/angular/angular/compare/5.2.4...5.2.5) (2018-02-14)
|
||||||
@ -485,34 +538,6 @@ If that is the case, you should be able to track the old value directly by savin
|
|||||||
* **language-service:** correct instructions to install the language service ([#22000](https://github.com/angular/angular/issues/22000)) ([0b23573](https://github.com/angular/angular/commit/0b23573))
|
* **language-service:** correct instructions to install the language service ([#22000](https://github.com/angular/angular/issues/22000)) ([0b23573](https://github.com/angular/angular/commit/0b23573))
|
||||||
* **platform-browser:** support 0/false/null values in transfer_state ([#22179](https://github.com/angular/angular/issues/22179)) ([da6ab91](https://github.com/angular/angular/commit/da6ab91))
|
* **platform-browser:** support 0/false/null values in transfer_state ([#22179](https://github.com/angular/angular/issues/22179)) ([da6ab91](https://github.com/angular/angular/commit/da6ab91))
|
||||||
|
|
||||||
<a name="6.0.0-beta.3"></a>
|
|
||||||
# [6.0.0-beta.3](https://github.com/angular/angular/compare/6.0.0-beta.2...6.0.0-beta.3) (2018-02-07)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **common:** don't convert null to a string when flushing a mock request ([#21417](https://github.com/angular/angular/issues/21417)) ([8b14488](https://github.com/angular/angular/commit/8b14488)), closes [#20744](https://github.com/angular/angular/issues/20744)
|
|
||||||
* **core:** fix [#20582](https://github.com/angular/angular/issues/20582), don't need to wrap zone in location change listener ([#20640](https://github.com/angular/angular/issues/20640)) ([f791e9f](https://github.com/angular/angular/commit/f791e9f))
|
|
||||||
* **core:** fix proper propagation of subscriptions in EventEmitter ([#22016](https://github.com/angular/angular/issues/22016)) ([e81606c](https://github.com/angular/angular/commit/e81606c)), closes [#21999](https://github.com/angular/angular/issues/21999)
|
|
||||||
* **core:** should check Zone existence when scheduleMicroTask ([#20656](https://github.com/angular/angular/issues/20656)) ([3a86940](https://github.com/angular/angular/commit/3a86940))
|
|
||||||
* **forms:** publish missing types ([#19941](https://github.com/angular/angular/issues/19941)) ([2707012](https://github.com/angular/angular/commit/2707012))
|
|
||||||
* **ivy:** generate correct interpolations ([#21946](https://github.com/angular/angular/issues/21946)) ([3cc1d76](https://github.com/angular/angular/commit/3cc1d76))
|
|
||||||
* **ivy:** generate lifecycle pattern ([#21865](https://github.com/angular/angular/issues/21865)) ([f816666](https://github.com/angular/angular/commit/f816666))
|
|
||||||
* **ivy:** improve `bindV` perf and memory usage ([#21881](https://github.com/angular/angular/issues/21881)) ([0846784](https://github.com/angular/angular/commit/0846784))
|
|
||||||
* **ivy:** remove unnecessary parameter of NgOnChangesFeature ([#21879](https://github.com/angular/angular/issues/21879)) ([65cf1ad](https://github.com/angular/angular/commit/65cf1ad))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **compiler-cli:** reflect static methods added to classes in metadata ([#21926](https://github.com/angular/angular/issues/21926)) ([eb8ddd2](https://github.com/angular/angular/commit/eb8ddd2))
|
|
||||||
* **ivy:** add canonical example of a pipe. ([#21834](https://github.com/angular/angular/issues/21834)) ([743d8bc](https://github.com/angular/angular/commit/743d8bc))
|
|
||||||
* **ivy:** add support for attributes on ng-content nodes ([#21935](https://github.com/angular/angular/issues/21935)) ([1aa2947](https://github.com/angular/angular/commit/1aa2947))
|
|
||||||
* **ivy:** memoize array literals in render3 ([#21973](https://github.com/angular/angular/issues/21973)) ([4d62be6](https://github.com/angular/angular/commit/4d62be6))
|
|
||||||
|
|
||||||
|
|
||||||
### Performance Improvements
|
|
||||||
|
|
||||||
* **ivy:** improve Uglify configuration in hello world integration test ([#21985](https://github.com/angular/angular/issues/21985)) ([7e51e52](https://github.com/angular/angular/commit/7e51e52))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="5.2.4"></a>
|
<a name="5.2.4"></a>
|
||||||
@ -528,17 +553,6 @@ If that is the case, you should be able to track the old value directly by savin
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="6.0.0-beta.2"></a>
|
|
||||||
# [6.0.0-beta.2](https://github.com/angular/angular/compare/6.0.0-beta.1...6.0.0-beta.2) (2018-01-31)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **router:** add navigationSource and restoredState to NavigationStart event ([#21728](https://github.com/angular/angular/issues/21728)) ([c40ae7f](https://github.com/angular/angular/commit/c40ae7f))
|
|
||||||
* **service-worker:** add helper script which will uninstall SW ([#21863](https://github.com/angular/angular/issues/21863)) ([b10540a](https://github.com/angular/angular/commit/b10540a))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="5.2.3"></a>
|
<a name="5.2.3"></a>
|
||||||
## [5.2.3](https://github.com/angular/angular/compare/5.2.2...5.2.3) (2018-01-31)
|
## [5.2.3](https://github.com/angular/angular/compare/5.2.2...5.2.3) (2018-01-31)
|
||||||
|
|
||||||
@ -556,32 +570,6 @@ If that is the case, you should be able to track the old value directly by savin
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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>
|
<a name="5.2.2"></a>
|
||||||
## [5.2.2](https://github.com/angular/angular/compare/5.2.1...5.2.2) (2018-01-25)
|
## [5.2.2](https://github.com/angular/angular/compare/5.2.1...5.2.2) (2018-01-25)
|
||||||
|
|
||||||
@ -601,36 +589,6 @@ If that is the case, you should be able to track the old value directly by savin
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **animations:** fix increment/decrement aliases example ([#18323](https://github.com/angular/angular/issues/18323)) ([d2aa8ac](https://github.com/angular/angular/commit/d2aa8ac))
|
|
||||||
* **benchpress:** should still support selenium_webdriver < 3.6.0 ([#21477](https://github.com/angular/angular/issues/21477)) ([9b84a32](https://github.com/angular/angular/commit/9b84a32))
|
|
||||||
* **common:** set correct timezone for ISO8601 dates in Safari ([#21506](https://github.com/angular/angular/issues/21506)) ([05208b8](https://github.com/angular/angular/commit/05208b8)), closes [#21491](https://github.com/angular/angular/issues/21491)
|
|
||||||
* **compiler:** cache external reference resolution ([#21359](https://github.com/angular/angular/issues/21359)) ([e3e2fc0](https://github.com/angular/angular/commit/e3e2fc0))
|
|
||||||
* **compiler:** make `.ngsummary.json` files idempotent ([#21448](https://github.com/angular/angular/issues/21448)) ([e64b1e9](https://github.com/angular/angular/commit/e64b1e9))
|
|
||||||
* **core:** fix chained http call ([#20924](https://github.com/angular/angular/issues/20924)) ([7e3f9a4](https://github.com/angular/angular/commit/7e3f9a4)), closes [#20921](https://github.com/angular/angular/issues/20921)
|
|
||||||
* **ivy:** Add workaround for AJD in google3 ([#21488](https://github.com/angular/angular/issues/21488)) ([6af3672](https://github.com/angular/angular/commit/6af3672))
|
|
||||||
* **language-service:** Clear caches when program changes ([#21337](https://github.com/angular/angular/issues/21337)) ([43e1520](https://github.com/angular/angular/commit/43e1520)), closes [#19405](https://github.com/angular/angular/issues/19405)
|
|
||||||
* **service-worker:** properly handle invalid hashes in all scenarios ([#21288](https://github.com/angular/angular/issues/21288)) ([3951098](https://github.com/angular/angular/commit/3951098))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **bazel:** allow ng_module rules to control whether type checking is enabled ([#21460](https://github.com/angular/angular/issues/21460)) ([cffa0fe](https://github.com/angular/angular/commit/cffa0fe))
|
|
||||||
* **core:** add binding name to content changed error ([#20352](https://github.com/angular/angular/issues/20352)) ([d3bf54b](https://github.com/angular/angular/commit/d3bf54b))
|
|
||||||
* **forms:** handle string with and without line boundary on pattern validator ([#19256](https://github.com/angular/angular/issues/19256)) ([54bf179](https://github.com/angular/angular/commit/54bf179))
|
|
||||||
|
|
||||||
|
|
||||||
### Performance Improvements
|
|
||||||
|
|
||||||
* **ivy:** add missing dom element in render3_function tree benchmark ([#21476](https://github.com/angular/angular/issues/21476)) ([9b5a485](https://github.com/angular/angular/commit/9b5a485))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="5.2.1"></a>
|
<a name="5.2.1"></a>
|
||||||
## [5.2.1](https://github.com/angular/angular/compare/5.2.0...5.2.1) (2018-01-17)
|
## [5.2.1](https://github.com/angular/angular/compare/5.2.0...5.2.1) (2018-01-17)
|
||||||
|
|
||||||
|
@ -227,10 +227,15 @@ The following is the list of supported scopes:
|
|||||||
|
|
||||||
There are currently a few exceptions to the "use package name" rule:
|
There are currently a few exceptions to the "use package name" rule:
|
||||||
|
|
||||||
* **packaging**: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
|
* **packaging**: used for changes that change the npm package layout in all of our packages, e.g.
|
||||||
|
public path changes, package.json changes done to all packages, d.ts file/format changes, changes
|
||||||
|
to bundles, etc.
|
||||||
* **changelog**: used for updating the release notes in CHANGELOG.md
|
* **changelog**: used for updating the release notes in CHANGELOG.md
|
||||||
* **aio**: used for docs-app (angular.io) related changes within the /aio directory of the repo
|
* **docs-infra**: used for docs-app (angular.io) related changes within the /aio directory of the
|
||||||
* none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
|
repo
|
||||||
|
* none/empty string: useful for `style`, `test` and `refactor` changes that are done across all
|
||||||
|
packages (e.g. `style: add missing semicolons`) and for docs changes that are not related to a
|
||||||
|
specific package (e.g. `docs: fix typo in tutorial`).
|
||||||
|
|
||||||
### Subject
|
### Subject
|
||||||
The subject contains a succinct description of the change:
|
The subject contains a succinct description of the change:
|
||||||
|
17
README.md
17
README.md
@ -5,10 +5,6 @@
|
|||||||
[](https://www.npmjs.com/@angular/core)
|
[](https://www.npmjs.com/@angular/core)
|
||||||
|
|
||||||
|
|
||||||
[](https://saucelabs.com/u/angular2-ci)
|
|
||||||
|
|
||||||
*Safari (7+), iOS (7+) and IE mobile (11) are tested on [BrowserStack][browserstack].*
|
|
||||||
|
|
||||||
# Angular
|
# Angular
|
||||||
|
|
||||||
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript and other languages.
|
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript and other languages.
|
||||||
@ -17,12 +13,19 @@ Angular is a development platform for building mobile and desktop web applicatio
|
|||||||
|
|
||||||
[Get started in 5 minutes][quickstart].
|
[Get started in 5 minutes][quickstart].
|
||||||
|
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
[Learn about the latest improvements][changelog].
|
||||||
|
|
||||||
|
|
||||||
## Want to help?
|
## Want to help?
|
||||||
|
|
||||||
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our
|
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our
|
||||||
guidelines for [contributing][contributing] and then check out one of our issues in the [hotlist: community-help](https://github.com/angular/angular/labels/hotlist%3A%20community-help).
|
guidelines for [contributing][contributing] and then check out one of our issues in the [hotlist: community-help](https://github.com/angular/angular/labels/hotlist%3A%20community-help).
|
||||||
|
|
||||||
[browserstack]: https://www.browserstack.com/automate/public-build/LzF3RzBVVGt6VWE2S0hHaC9uYllOZz09LS1BVjNTclBKV0x4eVRlcjA4QVY1M0N3PT0=--eb4ce8c8dc2c1c5b2b5352d473ee12a73ac20e06
|
[browserstack]: https://www.browserstack.com/automate/public-build/LzF3RzBVVGt6VWE2S0hHaC9uYllOZz09LS1BVjNTclBKV0x4eVRlcjA4QVY1M0N3PT0=--eb4ce8c8dc2c1c5b2b5352d473ee12a73ac20e06
|
||||||
[contributing]: http://github.com/angular/angular/blob/master/CONTRIBUTING.md
|
[contributing]: https://github.com/angular/angular/blob/master/CONTRIBUTING.md
|
||||||
[quickstart]: https://angular.io/docs/ts/latest/quickstart.html
|
[quickstart]: https://angular.io/guide/quickstart
|
||||||
[ng]: http://angular.io
|
[changelog]: https://github.com/angular/angular/blob/master/CHANGELOG.md
|
||||||
|
[ng]: https://angular.io
|
||||||
|
153
WORKSPACE
153
WORKSPACE
@ -1,33 +1,79 @@
|
|||||||
workspace(name = "angular")
|
workspace(name = "angular")
|
||||||
|
|
||||||
|
#
|
||||||
|
# Download Bazel toolchain dependencies as needed by build actions
|
||||||
|
#
|
||||||
|
|
||||||
http_archive(
|
http_archive(
|
||||||
name = "build_bazel_rules_nodejs",
|
name = "build_bazel_rules_nodejs",
|
||||||
url = "https://github.com/bazelbuild/rules_nodejs/archive/1931156c232a08356dfda02e9c8b0275c2e63c00.zip",
|
url = "https://github.com/bazelbuild/rules_nodejs/archive/20ff5892612f8359aec8aaf26dd3902a24976ada.zip",
|
||||||
strip_prefix = "rules_nodejs-1931156c232a08356dfda02e9c8b0275c2e63c00",
|
strip_prefix = "rules_nodejs-20ff5892612f8359aec8aaf26dd3902a24976ada",
|
||||||
sha256 = "9cfe33276a6ac0076ee9ee159c4a2576f9851c0f437435b5ac19b2e592493078",
|
sha256 = "07da9d4c3e688a02745d0f50709a87744706d4f5d1959b799b0ac38e97acd622",
|
||||||
)
|
)
|
||||||
|
|
||||||
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
|
http_archive(
|
||||||
|
name = "io_bazel_rules_webtesting",
|
||||||
check_bazel_version("0.11.1")
|
url = "https://github.com/bazelbuild/rules_webtesting/archive/7ffe970bbf380891754487f66c3d680c087d67f2.zip",
|
||||||
node_repositories(package_json = ["//:package.json"])
|
strip_prefix = "rules_webtesting-7ffe970bbf380891754487f66c3d680c087d67f2",
|
||||||
|
sha256 = "4fb0dca8c9a90547891b7ef486592775a523330fc4555c88cd8f09270055c2ce",
|
||||||
yarn_install(
|
|
||||||
name = "ts-api-guardian_runtime_deps",
|
|
||||||
package_json = "//tools/ts-api-guardian:package.json",
|
|
||||||
yarn_lock = "//tools/ts-api-guardian:yarn.lock",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
http_archive(
|
http_archive(
|
||||||
name = "build_bazel_rules_typescript",
|
name = "build_bazel_rules_typescript",
|
||||||
url = "https://github.com/bazelbuild/rules_typescript/archive/0.12.1.zip",
|
url = "https://github.com/bazelbuild/rules_typescript/archive/0.15.3.zip",
|
||||||
strip_prefix = "rules_typescript-0.12.1",
|
strip_prefix = "rules_typescript-0.15.3",
|
||||||
sha256 = "24e2c36f60508c6d270ae4265b89b381e3f66d550e70c367ed3755ad8d7ce3b0",
|
sha256 = "a2b26ac3fc13036011196063db1bf7f1eae81334449201dc28087ebfa3708c99",
|
||||||
)
|
)
|
||||||
|
|
||||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
|
http_archive(
|
||||||
|
name = "io_bazel_rules_go",
|
||||||
|
url = "https://github.com/bazelbuild/rules_go/releases/download/0.10.3/rules_go-0.10.3.tar.gz",
|
||||||
|
sha256 = "feba3278c13cde8d67e341a837f69a029f698d7a27ddbb2a202be7a10b22142a",
|
||||||
|
)
|
||||||
|
|
||||||
ts_setup_workspace()
|
# This commit matches the version of buildifier in angular/ngcontainer
|
||||||
|
# If you change this, also check if it matches the version in the angular/ngcontainer
|
||||||
|
# version in /.circleci/config.yml
|
||||||
|
BAZEL_BUILDTOOLS_VERSION = "82b21607e00913b16fe1c51bec80232d9d6de31c"
|
||||||
|
|
||||||
|
http_archive(
|
||||||
|
name = "com_github_bazelbuild_buildtools",
|
||||||
|
url = "https://github.com/bazelbuild/buildtools/archive/%s.zip" % BAZEL_BUILDTOOLS_VERSION,
|
||||||
|
strip_prefix = "buildtools-%s" % BAZEL_BUILDTOOLS_VERSION,
|
||||||
|
sha256 = "edb24c2f9c55b10a820ec74db0564415c0cf553fa55e9fc709a6332fb6685eff",
|
||||||
|
)
|
||||||
|
|
||||||
|
# Fetching the Bazel source code allows us to compile the Skylark linter
|
||||||
|
http_archive(
|
||||||
|
name = "io_bazel",
|
||||||
|
url = "https://github.com/bazelbuild/bazel/archive/968f87900dce45a7af749a965b72dbac51b176b3.zip",
|
||||||
|
strip_prefix = "bazel-968f87900dce45a7af749a965b72dbac51b176b3",
|
||||||
|
sha256 = "e373d2ae24955c1254c495c9c421c009d88966565c35e4e8444c082cb1f0f48f",
|
||||||
|
)
|
||||||
|
|
||||||
|
# We have a source dependency on the Devkit repository, because it's built with
|
||||||
|
# Bazel.
|
||||||
|
# This allows us to edit sources and have the effect appear immediately without
|
||||||
|
# re-packaging or "npm link"ing.
|
||||||
|
# Even better, things like aspects will visit the entire graph including
|
||||||
|
# ts_library rules in the devkit repository.
|
||||||
|
http_archive(
|
||||||
|
name = "angular_cli",
|
||||||
|
url = "https://github.com/angular/angular-cli/archive/v6.1.0-rc.0.zip",
|
||||||
|
strip_prefix = "angular-cli-6.1.0-rc.0",
|
||||||
|
sha256 = "8cf320ea58c321e103f39087376feea502f20eaf79c61a4fdb05c7286c8684fd",
|
||||||
|
)
|
||||||
|
|
||||||
|
http_archive(
|
||||||
|
name = "org_brotli",
|
||||||
|
url = "https://github.com/google/brotli/archive/f9b8c02673c576a3e807edbf3a9328e9e7af6d7c.zip",
|
||||||
|
strip_prefix = "brotli-f9b8c02673c576a3e807edbf3a9328e9e7af6d7c",
|
||||||
|
sha256 = "8a517806d2b7c8505ba5c53934e7d7c70d341b68ffd268e9044d35b564a48828",
|
||||||
|
)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Point Bazel to WORKSPACEs that live in subdirectories
|
||||||
|
#
|
||||||
|
|
||||||
local_repository(
|
local_repository(
|
||||||
name = "rxjs",
|
name = "rxjs",
|
||||||
@ -41,54 +87,53 @@ local_repository(
|
|||||||
path = "integration/bazel",
|
path = "integration/bazel",
|
||||||
)
|
)
|
||||||
|
|
||||||
# This commit matches the version of buildifier in angular/ngcontainer
|
#
|
||||||
# If you change this, also check if it matches the version in the angular/ngcontainer
|
# Load and install our dependencies downloaded above.
|
||||||
# version in /.circleci/config.yml
|
#
|
||||||
BAZEL_BUILDTOOLS_VERSION = "70bc7843bb9950fece2bc014ed16de03419e36e2"
|
|
||||||
|
|
||||||
http_archive(
|
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
|
||||||
name = "com_github_bazelbuild_buildtools",
|
|
||||||
url = "https://github.com/bazelbuild/buildtools/archive/%s.zip" % BAZEL_BUILDTOOLS_VERSION,
|
|
||||||
strip_prefix = "buildtools-%s" % BAZEL_BUILDTOOLS_VERSION,
|
|
||||||
sha256 = "367c23a5fe7fc2a7cb57863d3718b4149f0e57426c48c8ad54c45348a0b53cc1",
|
|
||||||
)
|
|
||||||
|
|
||||||
http_archive(
|
check_bazel_version("0.15.0")
|
||||||
name = "io_bazel_rules_go",
|
node_repositories(
|
||||||
url = "https://github.com/bazelbuild/rules_go/releases/download/0.10.3/rules_go-0.10.3.tar.gz",
|
package_json = ["//:package.json"],
|
||||||
sha256 = "feba3278c13cde8d67e341a837f69a029f698d7a27ddbb2a202be7a10b22142a",
|
preserve_symlinks = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
|
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
|
||||||
|
|
||||||
go_rules_dependencies()
|
go_rules_dependencies()
|
||||||
|
|
||||||
go_register_toolchains()
|
go_register_toolchains()
|
||||||
|
|
||||||
# Fetching the Bazel source code allows us to compile the Skylark linter
|
load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories")
|
||||||
http_archive(
|
|
||||||
name = "io_bazel",
|
web_test_repositories()
|
||||||
url = "https://github.com/bazelbuild/bazel/archive/5a35e72f9e97c06540c479f8c31512fb4656202f.zip",
|
browser_repositories(
|
||||||
strip_prefix = "bazel-5a35e72f9e97c06540c479f8c31512fb4656202f",
|
chromium = True,
|
||||||
sha256 = "ed33a52874c14e3b487fb50f390c541fab9c81a33d986d38fb01766a66dbcd21",
|
firefox = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
# We have a source dependency on the Devkit repository, because it's built with
|
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
|
||||||
# Bazel.
|
|
||||||
# This allows us to edit sources and have the effect appear immediately without
|
ts_setup_workspace()
|
||||||
# re-packaging or "npm link"ing.
|
|
||||||
# Even better, things like aspects will visit the entire graph including
|
load("@angular//:index.bzl", "ng_setup_workspace")
|
||||||
# ts_library rules in the devkit repository.
|
|
||||||
http_archive(
|
ng_setup_workspace()
|
||||||
name = "angular_devkit",
|
|
||||||
url = "https://github.com/angular/devkit/archive/v0.3.1.zip",
|
#
|
||||||
strip_prefix = "devkit-0.3.1",
|
# Ask Bazel to manage these toolchain dependencies for us.
|
||||||
sha256 = "31d4b597fe9336650acf13df053c1c84dcbe9c29c6a833bcac3819cd3fd8cad3",
|
# Bazel will run `yarn install` when one of these toolchains is requested during
|
||||||
|
# a build.
|
||||||
|
#
|
||||||
|
|
||||||
|
yarn_install(
|
||||||
|
name = "ts-api-guardian_runtime_deps",
|
||||||
|
package_json = "//tools/ts-api-guardian:package.json",
|
||||||
|
yarn_lock = "//tools/ts-api-guardian:yarn.lock",
|
||||||
)
|
)
|
||||||
|
|
||||||
http_archive(
|
yarn_install(
|
||||||
name = "org_brotli",
|
name = "http-server_runtime_deps",
|
||||||
url = "https://github.com/google/brotli/archive/c6333e1e79fb62ea088443f192293f964409b04e.zip",
|
package_json = "//tools/http-server:package.json",
|
||||||
strip_prefix = "brotli-c6333e1e79fb62ea088443f192293f964409b04e",
|
yarn_lock = "//tools/http-server:yarn.lock",
|
||||||
sha256 = "3f781988dee7dd3bcce2bf238294663cfaaf3b6433505bdb762e24d0a284d1dc",
|
|
||||||
)
|
)
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
||||||
"project": {
|
|
||||||
"name": "site"
|
|
||||||
},
|
|
||||||
"apps": [
|
|
||||||
{
|
|
||||||
"root": "src",
|
|
||||||
"outDir": "dist",
|
|
||||||
"assets": [
|
|
||||||
"assets",
|
|
||||||
"generated",
|
|
||||||
"app/search/search-worker.js",
|
|
||||||
"favicon.ico",
|
|
||||||
"pwa-manifest.json",
|
|
||||||
"google385281288605d160.html",
|
|
||||||
{ "glob": "custom-elements.min.js", "input": "../node_modules/@webcomponents/custom-elements", "output": "./assets/js" },
|
|
||||||
{ "glob": "native-shim.js", "input": "../node_modules/@webcomponents/custom-elements/src", "output": "./assets/js" }
|
|
||||||
],
|
|
||||||
"index": "index.html",
|
|
||||||
"main": "main.ts",
|
|
||||||
"polyfills": "polyfills.ts",
|
|
||||||
"test": "test.ts",
|
|
||||||
"tsconfig": "tsconfig.app.json",
|
|
||||||
"testTsconfig": "tsconfig.spec.json",
|
|
||||||
"prefix": "aio",
|
|
||||||
"serviceWorker": false,
|
|
||||||
"styles": [
|
|
||||||
"styles.scss"
|
|
||||||
],
|
|
||||||
"scripts": [
|
|
||||||
],
|
|
||||||
"environmentSource": "environments/environment.ts",
|
|
||||||
"environments": {
|
|
||||||
"dev": "environments/environment.ts",
|
|
||||||
"next": "environments/environment.next.ts",
|
|
||||||
"stable": "environments/environment.stable.ts",
|
|
||||||
"archive": "environments/environment.archive.ts"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"e2e": {
|
|
||||||
"protractor": {
|
|
||||||
"config": "tests/e2e/protractor.conf.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint": [
|
|
||||||
{
|
|
||||||
"project": "src/tsconfig.app.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"project": "src/tsconfig.spec.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"project": "tests/e2e/tsconfig.e2e.json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"test": {
|
|
||||||
"karma": {
|
|
||||||
"config": "src/karma.conf.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaults": {
|
|
||||||
"styleExt": "scss",
|
|
||||||
"component": {
|
|
||||||
"inlineStyle": true
|
|
||||||
},
|
|
||||||
"build": {
|
|
||||||
"namedChunks": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"packageManager": "yarn"
|
|
||||||
}
|
|
@ -22,7 +22,8 @@ Here are the most important tasks you might need to use:
|
|||||||
* `yarn start` - run a development web server that watches the files; then builds the doc-viewer and reloads the page, as necessary.
|
* `yarn start` - run a development web server that watches the files; then builds the doc-viewer and reloads the page, as necessary.
|
||||||
* `yarn serve-and-sync` - run both the `docs-watch` and `start` in the same console.
|
* `yarn serve-and-sync` - run both the `docs-watch` and `start` in the same console.
|
||||||
* `yarn lint` - check that the doc-viewer code follows our style rules.
|
* `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 test` - run all the unit tests once.
|
||||||
|
* `yarn test --watch` - 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.
|
* `yarn e2e` - run all the e2e tests for the doc-viewer.
|
||||||
|
|
||||||
* `yarn docs` - generate all the docs from the source files.
|
* `yarn docs` - generate all the docs from the source files.
|
||||||
@ -42,6 +43,17 @@ Here are the most important tasks you might need to use:
|
|||||||
|
|
||||||
* `yarn build-ie-polyfills` - generates a js file of polyfills that can be loaded in Internet Explorer.
|
* `yarn build-ie-polyfills` - generates a js file of polyfills that can be loaded in Internet Explorer.
|
||||||
|
|
||||||
|
## Developing on Windows
|
||||||
|
The `packages/` directory may contain Linux-specific symlinks, which are not recognized by Windows.
|
||||||
|
These unresolved links cause the docs generation process to fail because it cannot locate certain files.
|
||||||
|
|
||||||
|
> Hint: The following steps require administration rights or [Windows Developer Mode](https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development) enabled!
|
||||||
|
|
||||||
|
To fix this problem, run `scripts/windows/create-symlinks.sh`. This command creates temporary files where the symlinks used to be. Make sure not to commit those files with your documentation changes.
|
||||||
|
When you are done making and testing your documentation changes, you can restore the original symlinks and delete the temporary files by running `scripts/windows/remove-symlinks.sh`.
|
||||||
|
|
||||||
|
It's necessary to remove the temporary files, because otherwise they're displayed as local changes in your git working copy and certain operations are blocked.
|
||||||
|
|
||||||
## Using ServiceWorker locally
|
## Using ServiceWorker locally
|
||||||
|
|
||||||
Since abb36e3cb, running `yarn start --prod` will no longer set up the ServiceWorker, which
|
Since abb36e3cb, running `yarn start --prod` will no longer set up the ServiceWorker, which
|
||||||
|
@ -52,8 +52,7 @@ export class BuildCleaner {
|
|||||||
protected removeDir(dir: string) {
|
protected removeDir(dir: string) {
|
||||||
try {
|
try {
|
||||||
if (shell.test('-d', dir)) {
|
if (shell.test('-d', dir)) {
|
||||||
// Undocumented signature (see https://github.com/shelljs/shelljs/pull/663).
|
shell.chmod('-R', 'a+w', dir);
|
||||||
(shell as any).chmod('-R', 'a+w', dir);
|
|
||||||
shell.rm('-rf', dir);
|
shell.rm('-rf', dir);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -106,8 +106,7 @@ export class BuildCreator extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Undocumented signature (see https://github.com/shelljs/shelljs/pull/663).
|
shell.chmod('-R', 'a-w', outputDir);
|
||||||
(shell as any).chmod('-R', 'a-w', outputDir);
|
|
||||||
shell.rm('-f', inputFile);
|
shell.rm('-f', inputFile);
|
||||||
resolve();
|
resolve();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -98,8 +98,7 @@ class Helper {
|
|||||||
const prDir = this.getPrDir(pr, isPublic);
|
const prDir = this.getPrDir(pr, isPublic);
|
||||||
|
|
||||||
if (fs.existsSync(prDir)) {
|
if (fs.existsSync(prDir)) {
|
||||||
// Undocumented signature (see https://github.com/shelljs/shelljs/pull/663).
|
shell.chmod('-R', 'a+w', prDir);
|
||||||
(shell as any).chmod('-R', 'a+w', prDir);
|
|
||||||
shell.rm('-rf', prDir);
|
shell.rm('-rf', prDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "yarn clean-dist",
|
"prebuild": "yarn clean-dist",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"build-watch": "yarn tsc --watch",
|
"build-watch": "yarn build --watch",
|
||||||
"clean-dist": "node --eval \"require('shelljs').rm('-rf', 'dist')\"",
|
"clean-dist": "node --eval \"require('shelljs').rm('-rf', 'dist')\"",
|
||||||
"dev": "concurrently --kill-others --raw --success first \"yarn build-watch\" \"yarn test-watch\"",
|
"dev": "concurrently --kill-others --raw --success first \"yarn build-watch\" \"yarn test-watch\"",
|
||||||
"lint": "tslint --project tsconfig.json",
|
"lint": "tslint --project tsconfig.json",
|
||||||
@ -33,7 +33,7 @@
|
|||||||
"@types/jasmine": "^2.6.0",
|
"@types/jasmine": "^2.6.0",
|
||||||
"@types/jsonwebtoken": "^7.2.3",
|
"@types/jsonwebtoken": "^7.2.3",
|
||||||
"@types/node": "^8.0.30",
|
"@types/node": "^8.0.30",
|
||||||
"@types/shelljs": "^0.7.4",
|
"@types/shelljs": "^0.8.0",
|
||||||
"@types/supertest": "^2.0.3",
|
"@types/supertest": "^2.0.3",
|
||||||
"concurrently": "^3.5.0",
|
"concurrently": "^3.5.0",
|
||||||
"nodemon": "^1.12.1",
|
"nodemon": "^1.12.1",
|
||||||
|
@ -69,9 +69,9 @@
|
|||||||
"@types/express-serve-static-core" "*"
|
"@types/express-serve-static-core" "*"
|
||||||
"@types/mime" "*"
|
"@types/mime" "*"
|
||||||
|
|
||||||
"@types/shelljs@^0.7.4":
|
"@types/shelljs@^0.8.0":
|
||||||
version "0.7.4"
|
version "0.8.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.4.tgz#137b5f31306eaff4de120ffe5b9d74b297809cfc"
|
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/glob" "*"
|
"@types/glob" "*"
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
set -eux -o pipefail
|
set -eux -o pipefail
|
||||||
exec 3>&1
|
exec 3>&1
|
||||||
|
|
||||||
echo "\n\n[`date`] - Updating the preview server..."
|
echo -e "\n\n[`date`] - Updating the preview server..."
|
||||||
|
|
||||||
# Input
|
# Input
|
||||||
readonly HOST_REPO_DIR=$1
|
readonly HOST_REPO_DIR=$1
|
||||||
|
189
aio/angular.json
Normal file
189
aio/angular.json
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
{
|
||||||
|
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
|
||||||
|
"version": 1,
|
||||||
|
"cli": {
|
||||||
|
"packageManager": "yarn"
|
||||||
|
},
|
||||||
|
"newProjectRoot": "projects",
|
||||||
|
"projects": {
|
||||||
|
"site": {
|
||||||
|
"root": "",
|
||||||
|
"sourceRoot": "src",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"build": {
|
||||||
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
|
"options": {
|
||||||
|
"outputPath": "dist",
|
||||||
|
"index": "src/index.html",
|
||||||
|
"main": "src/main.ts",
|
||||||
|
"tsConfig": "src/tsconfig.app.json",
|
||||||
|
"aot": true,
|
||||||
|
"optimization": true,
|
||||||
|
"buildOptimizer": true,
|
||||||
|
"outputHashing": "all",
|
||||||
|
"sourceMap": true,
|
||||||
|
"statsJson": true,
|
||||||
|
"extractCss": true,
|
||||||
|
"extractLicenses": true,
|
||||||
|
"namedChunks": true,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"polyfills": "src/polyfills.ts",
|
||||||
|
"assets": [
|
||||||
|
"src/assets",
|
||||||
|
"src/generated",
|
||||||
|
"src/app/search/search-worker.js",
|
||||||
|
"src/favicon.ico",
|
||||||
|
"src/pwa-manifest.json",
|
||||||
|
"src/google385281288605d160.html",
|
||||||
|
{
|
||||||
|
"glob": "custom-elements.min.js",
|
||||||
|
"input": "node_modules/@webcomponents/custom-elements",
|
||||||
|
"output": "/assets/js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"glob": "native-shim.js",
|
||||||
|
"input": "node_modules/@webcomponents/custom-elements/src",
|
||||||
|
"output": "/assets/js"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"src/styles.scss"
|
||||||
|
],
|
||||||
|
"scripts": []
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"fast": {
|
||||||
|
"optimization": false
|
||||||
|
},
|
||||||
|
"next": {
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"src": "src/environments/environment.ts",
|
||||||
|
"replaceWith": "src/environments/environment.next.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"stable": {
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"src": "src/environments/environment.ts",
|
||||||
|
"replaceWith": "src/environments/environment.stable.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"archive": {
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"src": "src/environments/environment.ts",
|
||||||
|
"replaceWith": "src/environments/environment.archive.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serve": {
|
||||||
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "site:build"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"fast": {
|
||||||
|
"browserTarget": "site:build:fast"
|
||||||
|
},
|
||||||
|
"next": {
|
||||||
|
"browserTarget": "site:build:next"
|
||||||
|
},
|
||||||
|
"stable": {
|
||||||
|
"browserTarget": "site:build:stable"
|
||||||
|
},
|
||||||
|
"archive": {
|
||||||
|
"browserTarget": "site:build:archive"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extract-i18n": {
|
||||||
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "site:build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "src/test.ts",
|
||||||
|
"karmaConfig": "src/karma.conf.js",
|
||||||
|
"polyfills": "src/polyfills.ts",
|
||||||
|
"tsConfig": "src/tsconfig.spec.json",
|
||||||
|
"scripts": [],
|
||||||
|
"styles": [
|
||||||
|
"src/styles.scss"
|
||||||
|
],
|
||||||
|
"assets": [
|
||||||
|
"src/assets",
|
||||||
|
"src/generated",
|
||||||
|
"src/app/search/search-worker.js",
|
||||||
|
"src/favicon.ico",
|
||||||
|
"src/pwa-manifest.json",
|
||||||
|
"src/google385281288605d160.html",
|
||||||
|
{
|
||||||
|
"glob": "custom-elements.min.js",
|
||||||
|
"input": "node_modules/@webcomponents/custom-elements",
|
||||||
|
"output": "/assets/js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"glob": "native-shim.js",
|
||||||
|
"input": "node_modules/@webcomponents/custom-elements/src",
|
||||||
|
"output": "/assets/js"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"src/tsconfig.app.json",
|
||||||
|
"src/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"site-e2e": {
|
||||||
|
"root": "",
|
||||||
|
"projectType": "application",
|
||||||
|
"cli": {},
|
||||||
|
"schematics": {},
|
||||||
|
"architect": {
|
||||||
|
"e2e": {
|
||||||
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
|
"options": {
|
||||||
|
"protractorConfig": "tests/e2e/protractor.conf.js",
|
||||||
|
"devServerTarget": "site:serve"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"tests/e2e/tsconfig.e2e.json"
|
||||||
|
],
|
||||||
|
"exclude": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schematics": {
|
||||||
|
"@schematics/angular:component": {
|
||||||
|
"inlineStyle": true,
|
||||||
|
"prefix": "aio",
|
||||||
|
"styleext": "scss"
|
||||||
|
},
|
||||||
|
"@schematics/angular:directive": {
|
||||||
|
"prefix": "aio"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
aio/content/examples/.DS_Store
vendored
BIN
aio/content/examples/.DS_Store
vendored
Binary file not shown.
8
aio/content/examples/.gitignore
vendored
8
aio/content/examples/.gitignore
vendored
@ -13,18 +13,20 @@
|
|||||||
**/src/tsconfig.app.json
|
**/src/tsconfig.app.json
|
||||||
**/src/tsconfig.spec.json
|
**/src/tsconfig.spec.json
|
||||||
**/src/typings.d.ts
|
**/src/typings.d.ts
|
||||||
**/e2e/app.po.ts
|
**/e2e/src/app.po.ts
|
||||||
**/e2e/tsconfig.e2e.json
|
**/e2e/tsconfig.e2e.json
|
||||||
|
**/src/karma.conf.js
|
||||||
**/.angular-cli.json
|
**/.angular-cli.json
|
||||||
**/.editorconfig
|
**/.editorconfig
|
||||||
|
**/angular.json
|
||||||
**/tsconfig.json
|
**/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
|
**/karma-test-shim.js
|
||||||
**/browser-test-shim.js
|
**/browser-test-shim.js
|
||||||
|
**/browserslist
|
||||||
**/node_modules
|
**/node_modules
|
||||||
|
|
||||||
# built files
|
# built files
|
||||||
@ -58,6 +60,8 @@ dist/
|
|||||||
!rollup-config.js
|
!rollup-config.js
|
||||||
aot-compiler/**/*.d.ts
|
aot-compiler/**/*.d.ts
|
||||||
aot-compiler/**/*.factory.d.ts
|
aot-compiler/**/*.factory.d.ts
|
||||||
|
upgrade-phonecat-2-hybrid/aot/**/*
|
||||||
|
!upgrade-phonecat-2-hybrid/aot/index.html
|
||||||
|
|
||||||
# i18n
|
# i18n
|
||||||
!i18n/src/systemjs-text-plugin.js
|
!i18n/src/systemjs-text-plugin.js
|
||||||
|
@ -40,5 +40,7 @@ export class HighlightDirective {
|
|||||||
// #docregion color-2
|
// #docregion color-2
|
||||||
@Input() appHighlight: string;
|
@Input() appHighlight: string;
|
||||||
// #enddocregion color-2
|
// #enddocregion color-2
|
||||||
}
|
|
||||||
|
|
||||||
|
// #docregion
|
||||||
|
}
|
||||||
|
// #enddocregion
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { HttpModule } from '@angular/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
// #docregion directive-import
|
// #docregion directive-import
|
||||||
@ -24,7 +24,7 @@ import { ItemDirective } from './item.directive';
|
|||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
HttpModule
|
HttpClientModule
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
# MasterProject
|
|
||||||
|
|
||||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.0-rc.0.
|
|
||||||
|
|
||||||
## Development server
|
|
||||||
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.
|
|
||||||
|
|
||||||
## Code scaffolding
|
|
||||||
|
|
||||||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
## Running unit tests
|
|
||||||
|
|
||||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
||||||
|
|
||||||
## Running end-to-end tests
|
|
||||||
|
|
||||||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
|
|
||||||
Before running the tests make sure you are serving the app via `ng serve`.
|
|
||||||
|
|
||||||
## Further help
|
|
||||||
|
|
||||||
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).
|
|
@ -3,7 +3,7 @@
|
|||||||
"!**/*.d.ts",
|
"!**/*.d.ts",
|
||||||
"!**/*.js",
|
"!**/*.js",
|
||||||
"!**/*.[0-9].*",
|
"!**/*.[0-9].*",
|
||||||
".angular-cli.json",
|
"angular.json",
|
||||||
"protractor.conf.js"
|
"protractor.conf.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5,18 +5,18 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||||||
selector: 'app-voter',
|
selector: 'app-voter',
|
||||||
template: `
|
template: `
|
||||||
<h4>{{name}}</h4>
|
<h4>{{name}}</h4>
|
||||||
<button (click)="vote(true)" [disabled]="voted">Agree</button>
|
<button (click)="vote(true)" [disabled]="didVote">Agree</button>
|
||||||
<button (click)="vote(false)" [disabled]="voted">Disagree</button>
|
<button (click)="vote(false)" [disabled]="didVote">Disagree</button>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class VoterComponent {
|
export class VoterComponent {
|
||||||
@Input() name: string;
|
@Input() name: string;
|
||||||
@Output() onVoted = new EventEmitter<boolean>();
|
@Output() voted = new EventEmitter<boolean>();
|
||||||
voted = false;
|
didVote = false;
|
||||||
|
|
||||||
vote(agreed: boolean) {
|
vote(agreed: boolean) {
|
||||||
this.onVoted.emit(agreed);
|
this.voted.emit(agreed);
|
||||||
this.voted = true;
|
this.didVote = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
|
@ -8,7 +8,7 @@ import { Component } from '@angular/core';
|
|||||||
<h3>Agree: {{agreed}}, Disagree: {{disagreed}}</h3>
|
<h3>Agree: {{agreed}}, Disagree: {{disagreed}}</h3>
|
||||||
<app-voter *ngFor="let voter of voters"
|
<app-voter *ngFor="let voter of voters"
|
||||||
[name]="voter"
|
[name]="voter"
|
||||||
(onVoted)="onVoted($event)">
|
(voted)="onVoted($event)">
|
||||||
</app-voter>
|
</app-voter>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { HttpModule } from '@angular/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
|
|
||||||
// import { AppRoutingModule } from './app-routing.module';
|
// import { AppRoutingModule } from './app-routing.module';
|
||||||
import { LocationStrategy,
|
import { LocationStrategy,
|
||||||
@ -54,7 +54,7 @@ const c_components = [
|
|||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
HttpModule,
|
HttpClientModule,
|
||||||
InMemoryWebApiModule.forRoot(HeroData)
|
InMemoryWebApiModule.forRoot(HeroData)
|
||||||
// AppRoutingModule TODO: add routes
|
// AppRoutingModule TODO: add routes
|
||||||
],
|
],
|
||||||
|
@ -1,26 +1,38 @@
|
|||||||
import { ReflectiveInjector } from '@angular/core';
|
import { Injector } from '@angular/core';
|
||||||
|
|
||||||
import { Car, Engine, Tires } from './car';
|
import { Car, Engine, Tires } from './car';
|
||||||
import { Logger } from '../logger.service';
|
import { Logger } from '../logger.service';
|
||||||
|
|
||||||
// #docregion injector
|
// #docregion injector
|
||||||
export function useInjector() {
|
export function useInjector() {
|
||||||
let injector: ReflectiveInjector;
|
let injector: Injector;
|
||||||
// #enddocregion injector
|
// #enddocregion injector
|
||||||
/*
|
/*
|
||||||
// #docregion injector-no-new
|
// #docregion injector-no-new
|
||||||
// Cannot instantiate an ReflectiveInjector like this!
|
// Cannot instantiate an Injector like this!
|
||||||
let injector = new ReflectiveInjector([Car, Engine, Tires]);
|
let injector = new Injector([
|
||||||
|
{ provide: Car, deps: [Engine, Tires] },
|
||||||
|
{ provide: Engine, deps: [] },
|
||||||
|
{ provide: Tires, deps: [] }
|
||||||
|
]);
|
||||||
// #enddocregion injector-no-new
|
// #enddocregion injector-no-new
|
||||||
*/
|
*/
|
||||||
// #docregion injector, injector-create-and-call
|
// #docregion injector, injector-create-and-call
|
||||||
injector = ReflectiveInjector.resolveAndCreate([Car, Engine, Tires]);
|
injector = Injector.create({
|
||||||
|
providers: [
|
||||||
|
{ provide: Car, deps: [Engine, Tires] },
|
||||||
|
{ provide: Engine, deps: [] },
|
||||||
|
{ provide: Tires, deps: [] }
|
||||||
|
]
|
||||||
|
});
|
||||||
// #docregion injector-call
|
// #docregion injector-call
|
||||||
let car = injector.get(Car);
|
let car = injector.get(Car);
|
||||||
// #enddocregion injector-call, injector-create-and-call
|
// #enddocregion injector-call, injector-create-and-call
|
||||||
car.description = 'Injector';
|
car.description = 'Injector';
|
||||||
|
|
||||||
injector = ReflectiveInjector.resolveAndCreate([Logger]);
|
injector = Injector.create({
|
||||||
|
providers: [{ provide: Logger, deps: [] }]
|
||||||
|
});
|
||||||
let logger = injector.get(Logger);
|
let logger = injector.get(Logger);
|
||||||
logger.log('Injector car.drive() said: ' + car.drive());
|
logger.log('Injector car.drive() said: ' + car.drive());
|
||||||
return car;
|
return car;
|
||||||
|
@ -19,7 +19,7 @@ import { AdComponent } from './ad.component';
|
|||||||
// #docregion class
|
// #docregion class
|
||||||
export class AdBannerComponent implements OnInit, OnDestroy {
|
export class AdBannerComponent implements OnInit, OnDestroy {
|
||||||
@Input() ads: AdItem[];
|
@Input() ads: AdItem[];
|
||||||
currentAdIndex: number = -1;
|
currentAdIndex = -1;
|
||||||
@ViewChild(AdDirective) adHost: AdDirective;
|
@ViewChild(AdDirective) adHost: AdDirective;
|
||||||
interval: any;
|
interval: any;
|
||||||
|
|
||||||
|
69
aio/content/examples/elements/e2e/src/app.e2e-spec.ts
Normal file
69
aio/content/examples/elements/e2e/src/app.e2e-spec.ts
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
'use strict'; // necessary for es6 output in node
|
||||||
|
|
||||||
|
import { browser, by, element } from 'protractor';
|
||||||
|
|
||||||
|
/* tslint:disable:quotemark */
|
||||||
|
describe('Elements', () => {
|
||||||
|
const messageInput = element(by.css('input'));
|
||||||
|
const popupButtons = element.all(by.css('button'));
|
||||||
|
|
||||||
|
beforeEach(() => browser.get(''));
|
||||||
|
|
||||||
|
describe('popup component', () => {
|
||||||
|
const popupComponentButton = popupButtons.get(0);
|
||||||
|
const popupComponent = element(by.css('popup-component'));
|
||||||
|
const closeButton = popupComponent.element(by.css('button'));
|
||||||
|
|
||||||
|
it('should be displayed on button click', () => {
|
||||||
|
expect(popupComponent.isPresent()).toBe(false);
|
||||||
|
|
||||||
|
popupComponentButton.click();
|
||||||
|
expect(popupComponent.isPresent()).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display the specified message', () => {
|
||||||
|
messageInput.clear();
|
||||||
|
messageInput.sendKeys('Angular rocks!');
|
||||||
|
|
||||||
|
popupComponentButton.click();
|
||||||
|
expect(popupComponent.getText()).toContain('Popup: Angular rocks!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be closed on "close" button click', () => {
|
||||||
|
popupComponentButton.click();
|
||||||
|
expect(popupComponent.isPresent()).toBe(true);
|
||||||
|
|
||||||
|
closeButton.click();
|
||||||
|
expect(popupComponent.isPresent()).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('popup element', () => {
|
||||||
|
const popupElementButton = popupButtons.get(1);
|
||||||
|
const popupElement = element(by.css('popup-element'));
|
||||||
|
const closeButton = popupElement.element(by.css('button'));
|
||||||
|
|
||||||
|
it('should be displayed on button click', () => {
|
||||||
|
expect(popupElement.isPresent()).toBe(false);
|
||||||
|
|
||||||
|
popupElementButton.click();
|
||||||
|
expect(popupElement.isPresent()).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display the specified message', () => {
|
||||||
|
messageInput.clear();
|
||||||
|
messageInput.sendKeys('Angular rocks!');
|
||||||
|
|
||||||
|
popupElementButton.click();
|
||||||
|
expect(popupElement.getText()).toContain('Popup: Angular rocks!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be closed on "close" button click', () => {
|
||||||
|
popupElementButton.click();
|
||||||
|
expect(popupElement.isPresent()).toBe(true);
|
||||||
|
|
||||||
|
closeButton.click();
|
||||||
|
expect(popupElement.isPresent()).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
3
aio/content/examples/elements/example-config.json
Normal file
3
aio/content/examples/elements/example-config.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"projectType": "elements"
|
||||||
|
}
|
@ -1,6 +1,5 @@
|
|||||||
// #docregion
|
|
||||||
import { Component, Injector } from '@angular/core';
|
import { Component, Injector } from '@angular/core';
|
||||||
import { createNgElementConstructor } from '../elements-dist';
|
import { createCustomElement } from '@angular/elements';
|
||||||
import { PopupService } from './popup.service';
|
import { PopupService } from './popup.service';
|
||||||
import { PopupComponent } from './popup.component';
|
import { PopupComponent } from './popup.component';
|
||||||
|
|
||||||
@ -8,19 +7,15 @@ import { PopupComponent } from './popup.component';
|
|||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
template: `
|
template: `
|
||||||
<input #input value="Message">
|
<input #input value="Message">
|
||||||
<button (click)="popup.showAsComponent(input.value)">
|
<button (click)="popup.showAsComponent(input.value)">Show as component</button>
|
||||||
Show as component </button>
|
<button (click)="popup.showAsElement(input.value)">Show as element</button>
|
||||||
<button (click)="popup.showAsElement(input.value)">
|
`,
|
||||||
Show as element </button>
|
|
||||||
`
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
constructor(private injector: Injector, public popup: PopupService) {
|
constructor(injector: Injector, public popup: PopupService) {
|
||||||
// on init, convert PopupComponent to a custom element
|
// Convert `PopupComponent` to a custom element.
|
||||||
const PopupElement =
|
const PopupElement = createCustomElement(PopupComponent, {injector});
|
||||||
createNgElementConstructor(PopupComponent, {injector: this.injector});
|
// Register the custom element with the browser.
|
||||||
// register the custom element with the browser.
|
|
||||||
customElements.define('popup-element', PopupElement);
|
customElements.define('popup-element', PopupElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
// #docregion
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { PopupService } from './popup.service';
|
|
||||||
import { PopupComponent } from './popup.component';
|
import { PopupComponent } from './popup.component';
|
||||||
|
import { PopupService } from './popup.service';
|
||||||
|
|
||||||
// include the PopupService provider,
|
// Include the `PopupService` provider,
|
||||||
// but exclude PopupComponent from compilation,
|
// but exclude `PopupComponent` from compilation,
|
||||||
// because it will be added dynamically
|
// because it will be added dynamically.
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent, PopupComponent],
|
|
||||||
imports: [BrowserModule, BrowserAnimationsModule],
|
imports: [BrowserModule, BrowserAnimationsModule],
|
||||||
providers: [PopupService],
|
providers: [PopupService],
|
||||||
|
declarations: [AppComponent, PopupComponent],
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
entryComponents: [PopupComponent],
|
entryComponents: [PopupComponent],
|
||||||
})
|
})
|
||||||
|
export class AppModule {
|
||||||
export class AppModule {}
|
}
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
// #docregion
|
|
||||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { AnimationEvent } from '@angular/animations';
|
|
||||||
import { animate, state, style, transition, trigger } from '@angular/animations';
|
import { animate, state, style, transition, trigger } from '@angular/animations';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-popup',
|
selector: 'my-popup',
|
||||||
template: 'Popup: {{message}}',
|
template: `
|
||||||
|
<span>Popup: {{message}}</span>
|
||||||
|
<button (click)="closed.next()">✖</button>
|
||||||
|
`,
|
||||||
host: {
|
host: {
|
||||||
'[@state]': 'state',
|
'[@state]': 'state',
|
||||||
'(@state.done)': 'onAnimationDone($event)',
|
|
||||||
},
|
},
|
||||||
animations: [
|
animations: [
|
||||||
trigger('state', [
|
trigger('state', [
|
||||||
@ -27,13 +27,17 @@ import { animate, state, style, transition, trigger } from '@angular/animations'
|
|||||||
height: 48px;
|
height: 48px;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-top: 1px solid black;
|
border-top: 1px solid black;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
`]
|
`]
|
||||||
})
|
})
|
||||||
|
|
||||||
export class PopupComponent {
|
export class PopupComponent {
|
||||||
private state: 'opened' | 'closed' = 'closed';
|
private state: 'opened' | 'closed' = 'closed';
|
||||||
|
|
||||||
@ -41,18 +45,10 @@ export class PopupComponent {
|
|||||||
set message(message: string) {
|
set message(message: string) {
|
||||||
this._message = message;
|
this._message = message;
|
||||||
this.state = 'opened';
|
this.state = 'opened';
|
||||||
|
|
||||||
setTimeout(() => this.state = 'closed', 2000);
|
|
||||||
}
|
}
|
||||||
get message(): string { return this._message; }
|
get message(): string { return this._message; }
|
||||||
_message: string;
|
_message: string;
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
closed = new EventEmitter();
|
closed = new EventEmitter();
|
||||||
|
|
||||||
onAnimationDone(e: AnimationEvent) {
|
|
||||||
if (e.toState === 'closed') {
|
|
||||||
this.closed.next();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
// #docregion
|
|
||||||
import { ApplicationRef, ComponentFactoryResolver, Injectable, Injector } from '@angular/core';
|
import { ApplicationRef, ComponentFactoryResolver, Injectable, Injector } from '@angular/core';
|
||||||
|
import { NgElement, WithProperties } from '@angular/elements';
|
||||||
import { PopupComponent } from './popup.component';
|
import { PopupComponent } from './popup.component';
|
||||||
import { NgElementConstructor } from '../elements-dist';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class PopupService {
|
export class PopupService {
|
||||||
@ -40,7 +39,7 @@ export class PopupService {
|
|||||||
// This uses the new custom-element method to add the popup to the DOM.
|
// This uses the new custom-element method to add the popup to the DOM.
|
||||||
showAsElement(message: string) {
|
showAsElement(message: string) {
|
||||||
// Create element
|
// Create element
|
||||||
const popupEl = document.createElement('popup-element');
|
const popupEl: NgElement & WithProperties<PopupComponent> = document.createElement('popup-element') as any;
|
||||||
|
|
||||||
// Listen to the close event
|
// Listen to the close event
|
||||||
popupEl.addEventListener('closed', () => document.body.removeChild(popupEl));
|
popupEl.addEventListener('closed', () => document.body.removeChild(popupEl));
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
<!-- #docregion -->
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<base href="/">
|
|
||||||
<title>Angular With Webpack</title>
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<base href="/">
|
||||||
|
<title>Elements</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<my-app>Loading...</my-app>
|
<app-root></app-root>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<!-- #enddocregion -->
|
|
@ -1,4 +1,3 @@
|
|||||||
// tslint:disable:no-unused-variable
|
|
||||||
import { enableProdMode } from '@angular/core';
|
import { enableProdMode } from '@angular/core';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
@ -10,4 +9,3 @@ if (environment.production) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
|
9
aio/content/examples/elements/stackblitz.json
Normal file
9
aio/content/examples/elements/stackblitz.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"description": "Angular Elements",
|
||||||
|
"files":[
|
||||||
|
"!**/*.d.ts",
|
||||||
|
"!**/*.js",
|
||||||
|
"!**/*.[1].*"
|
||||||
|
],
|
||||||
|
"tags":["cookbook"]
|
||||||
|
}
|
@ -1,15 +1,14 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion app-module
|
// #docregion app-module
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { HttpModule } from '@angular/http';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
// import the feature module here so you can add it to the imports array below
|
// import the feature module here so you can add it to the imports array below
|
||||||
import { CustomerDashboardModule } from './customer-dashboard/customer-dashboard.module';
|
import { CustomerDashboardModule } from './customer-dashboard/customer-dashboard.module';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent
|
AppComponent
|
||||||
@ -17,7 +16,7 @@ import { CustomerDashboardModule } from './customer-dashboard/customer-dashboard
|
|||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
HttpModule,
|
HttpClientModule,
|
||||||
CustomerDashboardModule // add the feature module here
|
CustomerDashboardModule // add the feature module here
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [],
|
||||||
|
@ -16,6 +16,7 @@ describe('Form Validation Tests', function () {
|
|||||||
|
|
||||||
tests('Template-Driven Form');
|
tests('Template-Driven Form');
|
||||||
bobTests();
|
bobTests();
|
||||||
|
crossValidationTests();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Reactive form', () => {
|
describe('Reactive form', () => {
|
||||||
@ -25,6 +26,7 @@ describe('Form Validation Tests', function () {
|
|||||||
|
|
||||||
tests('Reactive Form');
|
tests('Reactive Form');
|
||||||
bobTests();
|
bobTests();
|
||||||
|
crossValidationTests();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -42,7 +44,8 @@ let page: {
|
|||||||
powerOption: ElementFinder,
|
powerOption: ElementFinder,
|
||||||
errorMessages: ElementArrayFinder,
|
errorMessages: ElementArrayFinder,
|
||||||
heroFormButtons: ElementArrayFinder,
|
heroFormButtons: ElementArrayFinder,
|
||||||
heroSubmitted: ElementFinder
|
heroSubmitted: ElementFinder,
|
||||||
|
crossValidationErrorMessage: ElementFinder,
|
||||||
};
|
};
|
||||||
|
|
||||||
function getPage(sectionTag: string) {
|
function getPage(sectionTag: string) {
|
||||||
@ -59,7 +62,8 @@ function getPage(sectionTag: string) {
|
|||||||
powerOption: section.element(by.css('#power option')),
|
powerOption: section.element(by.css('#power option')),
|
||||||
errorMessages: section.all(by.css('div.alert')),
|
errorMessages: section.all(by.css('div.alert')),
|
||||||
heroFormButtons: buttons,
|
heroFormButtons: buttons,
|
||||||
heroSubmitted: section.element(by.css('.submitted-message'))
|
heroSubmitted: section.element(by.css('.submitted-message')),
|
||||||
|
crossValidationErrorMessage: section.element(by.css('.cross-validation-error-message')),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,3 +176,29 @@ function bobTests() {
|
|||||||
expectFormIsValid();
|
expectFormIsValid();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function crossValidationTests() {
|
||||||
|
const emsg = 'Name cannot match alter ego.';
|
||||||
|
|
||||||
|
it(`should produce "${emsg}" error after setting name and alter ego to the same value`, function () {
|
||||||
|
page.nameInput.clear();
|
||||||
|
page.nameInput.sendKeys('Batman');
|
||||||
|
|
||||||
|
page.alterEgoInput.clear();
|
||||||
|
page.alterEgoInput.sendKeys('Batman');
|
||||||
|
|
||||||
|
expectFormIsInvalid();
|
||||||
|
expect(page.crossValidationErrorMessage.getText()).toBe(emsg);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be ok again with different values', function () {
|
||||||
|
page.nameInput.clear();
|
||||||
|
page.nameInput.sendKeys('Batman');
|
||||||
|
|
||||||
|
page.alterEgoInput.clear();
|
||||||
|
page.alterEgoInput.sendKeys('Superman');
|
||||||
|
|
||||||
|
expectFormIsValid();
|
||||||
|
expect(page.crossValidationErrorMessage.isPresent()).toBe(false);
|
||||||
|
});
|
||||||
|
}
|
@ -7,7 +7,7 @@ import { AppComponent } from './app.component';
|
|||||||
import { HeroFormTemplateComponent } from './template/hero-form-template.component';
|
import { HeroFormTemplateComponent } from './template/hero-form-template.component';
|
||||||
import { HeroFormReactiveComponent } from './reactive/hero-form-reactive.component';
|
import { HeroFormReactiveComponent } from './reactive/hero-form-reactive.component';
|
||||||
import { ForbiddenValidatorDirective } from './shared/forbidden-name.directive';
|
import { ForbiddenValidatorDirective } from './shared/forbidden-name.directive';
|
||||||
|
import { IdentityRevealedValidatorDirective } from './shared/identity-revealed.directive';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@ -19,7 +19,8 @@ import { ForbiddenValidatorDirective } from './shared/forbidden-name.directive';
|
|||||||
AppComponent,
|
AppComponent,
|
||||||
HeroFormTemplateComponent,
|
HeroFormTemplateComponent,
|
||||||
HeroFormReactiveComponent,
|
HeroFormReactiveComponent,
|
||||||
ForbiddenValidatorDirective
|
ForbiddenValidatorDirective,
|
||||||
|
IdentityRevealedValidatorDirective
|
||||||
],
|
],
|
||||||
bootstrap: [ AppComponent ]
|
bootstrap: [ AppComponent ]
|
||||||
})
|
})
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
/* tslint:disable: member-ordering forin */
|
||||||
|
// #docplaster
|
||||||
|
// #docregion
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
|
import { forbiddenNameValidator } from '../shared/forbidden-name.directive';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-hero-form-reactive',
|
||||||
|
templateUrl: './hero-form-reactive.component.html',
|
||||||
|
styleUrls: ['./hero-form-reactive.component.css'],
|
||||||
|
})
|
||||||
|
export class HeroFormReactiveComponent implements OnInit {
|
||||||
|
|
||||||
|
powers = ['Really Smart', 'Super Flexible', 'Weather Changer'];
|
||||||
|
|
||||||
|
hero = {name: 'Dr.', alterEgo: 'Dr. What', power: this.powers[0]};
|
||||||
|
|
||||||
|
heroForm: FormGroup;
|
||||||
|
|
||||||
|
// #docregion form-group
|
||||||
|
ngOnInit(): void {
|
||||||
|
// #docregion custom-validator
|
||||||
|
this.heroForm = new FormGroup({
|
||||||
|
'name': new FormControl(this.hero.name, [
|
||||||
|
Validators.required,
|
||||||
|
Validators.minLength(4),
|
||||||
|
forbiddenNameValidator(/bob/i) // <-- Here's how you pass in the custom validator.
|
||||||
|
]),
|
||||||
|
'alterEgo': new FormControl(this.hero.alterEgo),
|
||||||
|
'power': new FormControl(this.hero.power, Validators.required)
|
||||||
|
});
|
||||||
|
// #enddocregion custom-validator
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
get name() { return this.heroForm.get('name'); }
|
||||||
|
|
||||||
|
get power() { return this.heroForm.get('power'); }
|
||||||
|
// #enddocregion form-group
|
||||||
|
}
|
||||||
|
// #enddocregion
|
@ -0,0 +1,5 @@
|
|||||||
|
/* #docregion cross-validation-error-css */
|
||||||
|
.cross-validation-error input {
|
||||||
|
border-left: 5px solid red;
|
||||||
|
}
|
||||||
|
/* #enddocregion cross-validation-error-css */
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
<div [hidden]="formDir.submitted">
|
<div [hidden]="formDir.submitted">
|
||||||
|
|
||||||
|
<div class="cross-validation" [class.cross-validation-error]="heroForm.errors?.identityRevealed && (heroForm.touched || heroForm.dirty)">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
@ -36,6 +37,13 @@
|
|||||||
formControlName="alterEgo" >
|
formControlName="alterEgo" >
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- #docregion cross-validation-error-message -->
|
||||||
|
<div *ngIf="heroForm.errors?.identityRevealed && (heroForm.touched || heroForm.dirty)" class="cross-validation-error-message alert alert-danger">
|
||||||
|
Name cannot match alter ego.
|
||||||
|
</div>
|
||||||
|
<!-- #enddocregion cross-validation-error-message -->
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="power">Hero Power</label>
|
<label for="power">Hero Power</label>
|
||||||
<select id="power" class="form-control"
|
<select id="power" class="form-control"
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
/* tslint:disable: member-ordering forin */
|
/* tslint:disable: member-ordering forin */
|
||||||
// #docplaster
|
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import { forbiddenNameValidator } from '../shared/forbidden-name.directive';
|
import { forbiddenNameValidator } from '../shared/forbidden-name.directive';
|
||||||
|
import { identityRevealedValidator } from '../shared/identity-revealed.directive';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-hero-form-reactive',
|
selector: 'app-hero-form-reactive',
|
||||||
templateUrl: './hero-form-reactive.component.html'
|
templateUrl: './hero-form-reactive.component.html',
|
||||||
|
styleUrls: ['./hero-form-reactive.component.css'],
|
||||||
})
|
})
|
||||||
export class HeroFormReactiveComponent implements OnInit {
|
export class HeroFormReactiveComponent implements OnInit {
|
||||||
|
|
||||||
@ -17,24 +18,19 @@ export class HeroFormReactiveComponent implements OnInit {
|
|||||||
|
|
||||||
heroForm: FormGroup;
|
heroForm: FormGroup;
|
||||||
|
|
||||||
// #docregion form-group
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
// #docregion custom-validator
|
|
||||||
this.heroForm = new FormGroup({
|
this.heroForm = new FormGroup({
|
||||||
'name': new FormControl(this.hero.name, [
|
'name': new FormControl(this.hero.name, [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
Validators.minLength(4),
|
Validators.minLength(4),
|
||||||
forbiddenNameValidator(/bob/i) // <-- Here's how you pass in the custom validator.
|
forbiddenNameValidator(/bob/i)
|
||||||
]),
|
]),
|
||||||
'alterEgo': new FormControl(this.hero.alterEgo),
|
'alterEgo': new FormControl(this.hero.alterEgo),
|
||||||
'power': new FormControl(this.hero.power, Validators.required)
|
'power': new FormControl(this.hero.power, Validators.required)
|
||||||
});
|
}, { validators: identityRevealedValidator }); // <-- add custom validator at the FormGroup level
|
||||||
// #enddocregion custom-validator
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get name() { return this.heroForm.get('name'); }
|
get name() { return this.heroForm.get('name'); }
|
||||||
|
|
||||||
get power() { return this.heroForm.get('power'); }
|
get power() { return this.heroForm.get('power'); }
|
||||||
// #enddocregion form-group
|
|
||||||
}
|
}
|
||||||
// #enddocregion
|
|
||||||
|
@ -5,7 +5,7 @@ import { AbstractControl, NG_VALIDATORS, Validator, ValidatorFn, Validators } fr
|
|||||||
// #docregion custom-validator
|
// #docregion custom-validator
|
||||||
/** A hero's name can't match the given regular expression */
|
/** A hero's name can't match the given regular expression */
|
||||||
export function forbiddenNameValidator(nameRe: RegExp): ValidatorFn {
|
export function forbiddenNameValidator(nameRe: RegExp): ValidatorFn {
|
||||||
return (control: AbstractControl): {[key: string]: any} => {
|
return (control: AbstractControl): {[key: string]: any} | null => {
|
||||||
const forbidden = nameRe.test(control.value);
|
const forbidden = nameRe.test(control.value);
|
||||||
return forbidden ? {'forbiddenName': {value: control.value}} : null;
|
return forbidden ? {'forbiddenName': {value: control.value}} : null;
|
||||||
};
|
};
|
||||||
@ -22,7 +22,7 @@ export function forbiddenNameValidator(nameRe: RegExp): ValidatorFn {
|
|||||||
export class ForbiddenValidatorDirective implements Validator {
|
export class ForbiddenValidatorDirective implements Validator {
|
||||||
@Input('appForbiddenName') forbiddenName: string;
|
@Input('appForbiddenName') forbiddenName: string;
|
||||||
|
|
||||||
validate(control: AbstractControl): {[key: string]: any} {
|
validate(control: AbstractControl): {[key: string]: any} | null {
|
||||||
return this.forbiddenName ? forbiddenNameValidator(new RegExp(this.forbiddenName, 'i'))(control)
|
return this.forbiddenName ? forbiddenNameValidator(new RegExp(this.forbiddenName, 'i'))(control)
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
// #docregion
|
||||||
|
import { Directive } from '@angular/core';
|
||||||
|
import { AbstractControl, FormGroup, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn } from '@angular/forms';
|
||||||
|
|
||||||
|
// #docregion cross-validation-validator
|
||||||
|
/** A hero's name can't match the hero's alter ego */
|
||||||
|
export const identityRevealedValidator: ValidatorFn = (control: FormGroup): ValidationErrors | null => {
|
||||||
|
const name = control.get('name');
|
||||||
|
const alterEgo = control.get('alterEgo');
|
||||||
|
|
||||||
|
return name && alterEgo && name.value === alterEgo.value ? { 'identityRevealed': true } : null;
|
||||||
|
};
|
||||||
|
// #enddocregion cross-validation-validator
|
||||||
|
|
||||||
|
// #docregion cross-validation-directive
|
||||||
|
@Directive({
|
||||||
|
selector: '[appIdentityRevealed]',
|
||||||
|
providers: [{ provide: NG_VALIDATORS, useExisting: IdentityRevealedValidatorDirective, multi: true }]
|
||||||
|
})
|
||||||
|
export class IdentityRevealedValidatorDirective implements Validator {
|
||||||
|
validate(control: AbstractControl): ValidationErrors {
|
||||||
|
return identityRevealedValidator(control)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// #enddocregion cross-validation-directive
|
@ -0,0 +1,4 @@
|
|||||||
|
/* #docregion */
|
||||||
|
.cross-validation-error input {
|
||||||
|
border-left: 5px solid red;
|
||||||
|
}
|
@ -2,11 +2,11 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<h1>Template-Driven Form</h1>
|
<h1>Template-Driven Form</h1>
|
||||||
<!-- #docregion form-tag-->
|
<!-- #docregion cross-validation-register-validator -->
|
||||||
<form #heroForm="ngForm">
|
<form #heroForm="ngForm" appIdentityRevealed>
|
||||||
<!-- #enddocregion form-tag-->
|
<!-- #enddocregion cross-validation-register-validator -->
|
||||||
<div [hidden]="heroForm.submitted">
|
<div [hidden]="heroForm.submitted">
|
||||||
|
<div class="cross-validation" [class.cross-validation-error]="heroForm.errors?.identityRevealed && (heroForm.touched || heroForm.dirty)">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
<!-- #docregion name-with-error-msg -->
|
<!-- #docregion name-with-error-msg -->
|
||||||
@ -39,6 +39,13 @@
|
|||||||
name="alterEgo" [(ngModel)]="hero.alterEgo" >
|
name="alterEgo" [(ngModel)]="hero.alterEgo" >
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- #docregion cross-validation-error-message -->
|
||||||
|
<div *ngIf="heroForm.errors?.identityRevealed && (heroForm.touched || heroForm.dirty)" class="cross-validation-error-message alert alert-danger">
|
||||||
|
Name cannot match alter ego.
|
||||||
|
</div>
|
||||||
|
<!-- #enddocregion cross-validation-error-message -->
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="power">Hero Power</label>
|
<label for="power">Hero Power</label>
|
||||||
<select id="power" name="power" class="form-control"
|
<select id="power" name="power" class="form-control"
|
||||||
@ -62,5 +69,4 @@
|
|||||||
<button (click)="heroForm.resetForm({})">Add new hero</button>
|
<button (click)="heroForm.resetForm({})">Add new hero</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
// #docregion component
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-hero-form-template',
|
selector: 'app-hero-form-template',
|
||||||
templateUrl: './hero-form-template.component.html'
|
templateUrl: './hero-form-template.component.html',
|
||||||
|
styleUrls: ['./hero-form-template.component.css'],
|
||||||
})
|
})
|
||||||
export class HeroFormTemplateComponent {
|
export class HeroFormTemplateComponent {
|
||||||
|
|
||||||
@ -14,3 +16,4 @@ export class HeroFormTemplateComponent {
|
|||||||
hero = {name: 'Dr.', alterEgo: 'Dr. What', power: this.powers[0]};
|
hero = {name: 'Dr.', alterEgo: 'Dr. What', power: this.powers[0]};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// #enddocregion
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"description": "Validation",
|
"description": "Validation",
|
||||||
"files":[
|
"files":[
|
||||||
"!**/*.d.ts",
|
"!**/*.d.ts",
|
||||||
"!**/*.js"
|
"!**/*.js",
|
||||||
|
"!**/*.[1].*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ describe('HttpClient testing', () => {
|
|||||||
|
|
||||||
// Create mock ErrorEvent, raised when something goes wrong at the network level.
|
// Create mock ErrorEvent, raised when something goes wrong at the network level.
|
||||||
// Connection timeout, DNS error, offline, etc
|
// Connection timeout, DNS error, offline, etc
|
||||||
const errorEvent = new ErrorEvent('so sad', {
|
const mockError = new ErrorEvent('Network error', {
|
||||||
message: emsg,
|
message: emsg,
|
||||||
// #enddocregion network-error
|
// #enddocregion network-error
|
||||||
// The rest of this is optional and not used.
|
// The rest of this is optional and not used.
|
||||||
@ -162,7 +162,7 @@ describe('HttpClient testing', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Respond with mock error
|
// Respond with mock error
|
||||||
req.error(errorEvent);
|
req.error(mockError);
|
||||||
});
|
});
|
||||||
// #enddocregion network-error
|
// #enddocregion network-error
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { HttpModule } from '@angular/http';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
|
||||||
|
|
||||||
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@ -13,7 +13,7 @@ import { AppComponent } from './app.component';
|
|||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
HttpModule,
|
HttpClientModule,
|
||||||
AppRoutingModule
|
AppRoutingModule
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [],
|
||||||
|
@ -38,8 +38,6 @@ export class MyCounterComponent implements OnChanges {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************/
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'counter-parent',
|
selector: 'counter-parent',
|
||||||
template: `
|
template: `
|
||||||
|
@ -72,8 +72,6 @@ export class DoCheckComponent implements DoCheck {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************/
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'do-check-parent',
|
selector: 'do-check-parent',
|
||||||
templateUrl: './do-check-parent.component.html',
|
templateUrl: './do-check-parent.component.html',
|
||||||
|
@ -46,8 +46,6 @@ export class OnChangesComponent implements OnChanges {
|
|||||||
reset() { this.changeLog = []; }
|
reset() { this.changeLog = []; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************/
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'on-changes-parent',
|
selector: 'on-changes-parent',
|
||||||
templateUrl: './on-changes-parent.component.html',
|
templateUrl: './on-changes-parent.component.html',
|
||||||
|
@ -4,7 +4,8 @@ button {
|
|||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
code, .code {
|
code,
|
||||||
|
.code {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
color: black;
|
color: black;
|
||||||
font-family: Courier, sans-serif;
|
font-family: Courier, sans-serif;
|
||||||
@ -21,14 +22,18 @@ div.code {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
margin: 40px 0
|
margin: 40px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
td, th {
|
td,
|
||||||
|
th {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #docregion p-span */
|
/* #docregion p-span */
|
||||||
p span { color: red; font-size: 70%; }
|
p span {
|
||||||
|
color: red;
|
||||||
|
font-size: 70%;
|
||||||
|
}
|
||||||
/* #enddocregion p-span */
|
/* #enddocregion p-span */
|
||||||
|
@ -132,7 +132,7 @@
|
|||||||
<!-- #docregion select-span -->
|
<!-- #docregion select-span -->
|
||||||
<select [(ngModel)]="hero">
|
<select [(ngModel)]="hero">
|
||||||
<span *ngFor="let h of heroes">
|
<span *ngFor="let h of heroes">
|
||||||
<span *ngIf="showSad || h?.emotion != 'sad'">
|
<span *ngIf="showSad || h?.emotion !== 'sad'">
|
||||||
<option [ngValue]="h">{{h.name}} ({{h?.emotion}})</option>
|
<option [ngValue]="h">{{h.name}} ({{h?.emotion}})</option>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
@ -147,7 +147,7 @@
|
|||||||
<!-- #docregion select-ngcontainer -->
|
<!-- #docregion select-ngcontainer -->
|
||||||
<select [(ngModel)]="hero">
|
<select [(ngModel)]="hero">
|
||||||
<ng-container *ngFor="let h of heroes">
|
<ng-container *ngFor="let h of heroes">
|
||||||
<ng-container *ngIf="showSad || h?.emotion != 'sad'">
|
<ng-container *ngIf="showSad || h?.emotion !== 'sad'">
|
||||||
<option [ngValue]="h">{{h.name}} ({{h?.emotion}})</option>
|
<option [ngValue]="h">{{h.name}} ({{h?.emotion}})</option>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -14,6 +14,7 @@ export class AppComponent {
|
|||||||
heroTraits = ['honest', 'brave', 'considerate'];
|
heroTraits = ['honest', 'brave', 'considerate'];
|
||||||
|
|
||||||
// flags for the table
|
// flags for the table
|
||||||
|
|
||||||
attrDirs = true;
|
attrDirs = true;
|
||||||
strucDirs = true;
|
strucDirs = true;
|
||||||
divNgIf = false;
|
divNgIf = false;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
|
|
||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -33,11 +34,15 @@ export class ConfusedHeroComponent {
|
|||||||
export class UnknownHeroComponent {
|
export class UnknownHeroComponent {
|
||||||
@Input() hero: Hero;
|
@Input() hero: Hero;
|
||||||
get message() {
|
get message() {
|
||||||
return this.hero && this.hero.name ?
|
return this.hero && this.hero.name
|
||||||
`${this.hero.name} is strange and mysterious.` :
|
? `${this.hero.name} is strange and mysterious.`
|
||||||
'Are you feeling indecisive?';
|
: 'Are you feeling indecisive?';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const heroComponents =
|
export const heroComponents = [
|
||||||
[ HappyHeroComponent, SadHeroComponent, ConfusedHeroComponent, UnknownHeroComponent ];
|
HappyHeroComponent,
|
||||||
|
SadHeroComponent,
|
||||||
|
ConfusedHeroComponent,
|
||||||
|
UnknownHeroComponent
|
||||||
|
];
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
import { HttpModule } from '@angular/http';
|
|
||||||
|
|
||||||
/* App Root */
|
/* App Root */
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
@ -15,7 +15,7 @@ function sequenceSubscriber(observer) {
|
|||||||
if (idx === arr.length - 1) {
|
if (idx === arr.length - 1) {
|
||||||
observer.complete();
|
observer.complete();
|
||||||
} else {
|
} else {
|
||||||
doSequence(arr, idx++);
|
doSequence(arr, ++idx);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ function multicastSequenceSubscriber() {
|
|||||||
},
|
},
|
||||||
complete() {
|
complete() {
|
||||||
// Notify all complete callbacks
|
// Notify all complete callbacks
|
||||||
observers.forEach(obs => obs.complete());
|
observers.slice(0).forEach(obs => obs.complete());
|
||||||
}
|
}
|
||||||
}, seq, 0);
|
}, seq, 0);
|
||||||
}
|
}
|
||||||
@ -121,13 +121,13 @@ function doSequence(observer, arr, idx) {
|
|||||||
if (idx === arr.length - 1) {
|
if (idx === arr.length - 1) {
|
||||||
observer.complete();
|
observer.complete();
|
||||||
} else {
|
} else {
|
||||||
doSequence(observer, arr, idx++);
|
doSequence(observer, arr, ++idx);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a new Observable that will deliver the above sequence
|
// Create a new Observable that will deliver the above sequence
|
||||||
const multicastSequence = new Observable(multicastSequenceSubscriber);
|
const multicastSequence = new Observable(multicastSequenceSubscriber());
|
||||||
|
|
||||||
// Subscribe starts the clock, and begins to emit after 1 second
|
// Subscribe starts the clock, and begins to emit after 1 second
|
||||||
multicastSequence.subscribe({
|
multicastSequence.subscribe({
|
||||||
|
@ -1,26 +1,21 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { HttpClientModule } from '@angular//common/http';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import {
|
import { ExponentialStrengthPipe } from './exponential-strength.pipe';
|
||||||
FlyingHeroesComponent,
|
import { FetchJsonPipe } from './fetch-json.pipe';
|
||||||
FlyingHeroesImpureComponent
|
import { FlyingHeroesComponent, FlyingHeroesImpureComponent } from './flying-heroes.component';
|
||||||
} from './flying-heroes.component';
|
import { FlyingHeroesImpurePipe, FlyingHeroesPipe } from './flying-heroes.pipe';
|
||||||
import { HeroAsyncMessageComponent } from './hero-async-message.component';
|
import { HeroAsyncMessageComponent } from './hero-async-message.component';
|
||||||
import { HeroBirthdayComponent } from './hero-birthday1.component';
|
import { HeroBirthdayComponent } from './hero-birthday1.component';
|
||||||
import { HeroBirthday2Component } from './hero-birthday2.component';
|
import { HeroBirthday2Component } from './hero-birthday2.component';
|
||||||
import { HeroListComponent } from './hero-list.component';
|
import { HeroListComponent } from './hero-list.component';
|
||||||
import { PowerBoosterComponent } from './power-booster.component';
|
|
||||||
import { PowerBoostCalculatorComponent } from './power-boost-calculator.component';
|
import { PowerBoostCalculatorComponent } from './power-boost-calculator.component';
|
||||||
import {
|
import { PowerBoosterComponent } from './power-booster.component';
|
||||||
FlyingHeroesPipe,
|
|
||||||
FlyingHeroesImpurePipe
|
|
||||||
} from './flying-heroes.pipe';
|
|
||||||
import { FetchJsonPipe } from './fetch-json.pipe';
|
|
||||||
import { ExponentialStrengthPipe } from './exponential-strength.pipe';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
|
|
||||||
// #docregion pipe-metadata
|
// #docregion pipe-metadata
|
||||||
@Pipe({
|
@Pipe({
|
||||||
name: 'fetch',
|
name: 'fetch',
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
[1030/162525.401:ERROR:process_reader_win.cc(123)] NtOpenThread: {Acceso denegado} Un proceso ha solicitado acceso a un objeto, pero no se le han concedido esos derechos de acceso. (0xc0000022)
|
|
||||||
[1030/162525.402:ERROR:exception_snapshot_win.cc(87)] thread ID 26896 not found in process
|
|
||||||
[1030/162525.402:WARNING:crash_report_exception_handler.cc(62)] ProcessSnapshotWin::Initialize failed
|
|
File diff suppressed because it is too large
Load Diff
145
aio/content/examples/reactive-forms/e2e/src/app.e2e-spec.ts
Normal file
145
aio/content/examples/reactive-forms/e2e/src/app.e2e-spec.ts
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
'use strict'; // necessary for es6 output in node
|
||||||
|
|
||||||
|
import { browser, element, by } from 'protractor';
|
||||||
|
|
||||||
|
describe('Reactive forms', function () {
|
||||||
|
const nameEditor = element(by.css('app-name-editor'));
|
||||||
|
const profileEditor = element(by.css('app-profile-editor'));
|
||||||
|
const nameEditorLink = element(by.cssContainingText('app-root > nav > a', 'Name Editor'));
|
||||||
|
const profileEditorLink = element(by.cssContainingText('app-root > nav > a', 'Profile Editor'));
|
||||||
|
|
||||||
|
beforeAll(function () {
|
||||||
|
browser.get('');
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Name Editor', function () {
|
||||||
|
const nameInput = nameEditor.element(by.css('input'));
|
||||||
|
const updateButton = nameEditor.element(by.buttonText('Update Name'));
|
||||||
|
const nameText = 'John Smith';
|
||||||
|
|
||||||
|
beforeAll(async () => {
|
||||||
|
await nameEditorLink.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await nameInput.clear();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should update the name value when the name control is updated', async () => {
|
||||||
|
await nameInput.sendKeys(nameText);
|
||||||
|
|
||||||
|
const value = await nameInput.getAttribute('value');
|
||||||
|
|
||||||
|
expect(value).toBe(nameText);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should update the name control when the Update Name button is clicked', async () => {
|
||||||
|
await nameInput.sendKeys(nameText);
|
||||||
|
const value = await nameInput.getAttribute('value');
|
||||||
|
|
||||||
|
expect(value).toBe(nameText);
|
||||||
|
await updateButton.click();
|
||||||
|
|
||||||
|
const value = await nameInput.getAttribute('value');
|
||||||
|
|
||||||
|
expect(value).toBe('Nancy');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should update the displayed control value when the name control updated', async () => {
|
||||||
|
await nameInput.sendKeys(nameText);
|
||||||
|
const valueElement = nameEditor.element(by.cssContainingText('p', 'Value:'));
|
||||||
|
const nameValueElement = await valueElement.getText();
|
||||||
|
const nameValue = nameValueElement.toString().replace('Value: ', '');
|
||||||
|
|
||||||
|
expect(nameValue).toBe(nameText);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Profile Editor', function () {
|
||||||
|
const firstNameInput = getInput('firstName');
|
||||||
|
const lastNameInput = getInput('lastName');
|
||||||
|
const streetInput = getInput('street');
|
||||||
|
const addAliasButton = element(by.buttonText('Add Alias'));
|
||||||
|
const updateButton = profileEditor.element(by.buttonText('Update Profile'));
|
||||||
|
const profile = {
|
||||||
|
firstName: 'John',
|
||||||
|
lastName: 'Smith',
|
||||||
|
street: '345 South Lane',
|
||||||
|
city: 'Northtown',
|
||||||
|
state: 'XX',
|
||||||
|
zip: 12345
|
||||||
|
};
|
||||||
|
|
||||||
|
beforeAll(async () => {
|
||||||
|
await profileEditorLink.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await browser.get('');
|
||||||
|
await profileEditorLink.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be invalid by default', async () => {
|
||||||
|
expect(await profileEditor.getText()).toContain('Form Status: INVALID');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be valid if the First Name is filled in', async () => {
|
||||||
|
await firstNameInput.clear();
|
||||||
|
await firstNameInput.sendKeys('John Smith');
|
||||||
|
|
||||||
|
expect(await profileEditor.getText()).toContain('Form Status: VALID');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should update the name when the button is clicked', async () => {
|
||||||
|
await firstNameInput.clear();
|
||||||
|
await streetInput.clear();
|
||||||
|
await firstNameInput.sendKeys('John');
|
||||||
|
await streetInput.sendKeys('345 Smith Lane');
|
||||||
|
const firstNameInitial = await firstNameInput.getAttribute('value');
|
||||||
|
const streetNameInitial = await streetInput.getAttribute('value');
|
||||||
|
|
||||||
|
expect(firstNameInitial).toBe('John');
|
||||||
|
expect(streetNameInitial).toBe('345 Smith Lane');
|
||||||
|
await updateButton.click();
|
||||||
|
|
||||||
|
const nameValue = await firstNameInput.getAttribute('value');
|
||||||
|
const streetValue = await streetInput.getAttribute('value');
|
||||||
|
|
||||||
|
expect(nameValue).toBe('Nancy');
|
||||||
|
expect(streetValue).toBe('123 Drew Street');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should add an alias field when the Add Alias button is clicked', async () => {
|
||||||
|
await addAliasButton.click();
|
||||||
|
|
||||||
|
const aliasInputs = profileEditor.all(by.cssContainingText('label', 'Alias'));
|
||||||
|
|
||||||
|
expect(await aliasInputs.count()).toBe(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should update the displayed form value when form inputs are updated', async () => {
|
||||||
|
const aliasText = 'Johnny';
|
||||||
|
const inputs = await Promise.all(
|
||||||
|
Object.keys(profile)
|
||||||
|
.map(key =>
|
||||||
|
getInput(key).sendKeys(`${profile[key]}`)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
const aliasInputs = profileEditor.all(by.cssContainingText('label', 'Alias'));
|
||||||
|
const aliasInput = aliasInputs.get(0).element(by.css('input'));
|
||||||
|
await aliasInput.sendKeys(aliasText);
|
||||||
|
const formValueElement = profileEditor.all(by.cssContainingText('p', 'Form Value:'));
|
||||||
|
const formValue = await formValueElement.getText();
|
||||||
|
const formJson = JSON.parse(formValue.toString().replace('Form Value:', ''));
|
||||||
|
|
||||||
|
expect(profile.firstName).toBe(formJson.firstName);
|
||||||
|
expect(profile.lastName).toBe(formJson.lastName);
|
||||||
|
expect(formJson.aliases[0]).toBe(aliasText);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function getInput(key: string) {
|
||||||
|
return element(by.css(`input[formcontrolname=${key}`));
|
||||||
|
}
|
||||||
|
});
|
@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"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"]
|
|
||||||
}
|
|
@ -1,4 +1,10 @@
|
|||||||
<div class="container">
|
<!-- #docplaster -->
|
||||||
<h1>Reactive Forms</h1>
|
<h1>Reactive Forms</h1>
|
||||||
<app-hero-detail></app-hero-detail>
|
|
||||||
</div>
|
<!-- #docregion app-name-editor-->
|
||||||
|
<app-name-editor></app-name-editor>
|
||||||
|
<!-- #enddocregion app-name-editor-->
|
||||||
|
|
||||||
|
<!-- #docregion app-profile-editor -->
|
||||||
|
<app-profile-editor></app-profile-editor>
|
||||||
|
<!-- #enddocregion app-profile-editor -->
|
@ -1,4 +1,17 @@
|
|||||||
<div class="container">
|
<!-- #docplaster -->
|
||||||
|
<!-- #docregion app-name-editor -->
|
||||||
<h1>Reactive Forms</h1>
|
<h1>Reactive Forms</h1>
|
||||||
<app-hero-list></app-hero-list>
|
|
||||||
</div>
|
<!-- #enddocregion app-name-editor -->
|
||||||
|
<nav>
|
||||||
|
<a (click)="toggleEditor('name')">Name Editor</a>
|
||||||
|
<a (click)="toggleEditor('profile')">Profile Editor</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- #docregion app-name-editor -->
|
||||||
|
<app-name-editor *ngIf="showNameEditor"></app-name-editor>
|
||||||
|
<!-- #enddocregion app-name-editor -->
|
||||||
|
|
||||||
|
<!-- #docregion app-profile-editor -->
|
||||||
|
<app-profile-editor *ngIf="showProfileEditor"></app-profile-editor>
|
||||||
|
<!-- #enddocregion app-profile-editor -->
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
import { TestBed, async } from '@angular/core/testing';
|
||||||
|
import { AppComponent } from './app.component';
|
||||||
|
describe('AppComponent', () => {
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [
|
||||||
|
AppComponent
|
||||||
|
],
|
||||||
|
}).compileComponents();
|
||||||
|
}));
|
||||||
|
it('should create the app', async(() => {
|
||||||
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
|
const app = fixture.debugElement.componentInstance;
|
||||||
|
expect(app).toBeTruthy();
|
||||||
|
}));
|
||||||
|
it(`should have as title 'app'`, async(() => {
|
||||||
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
|
const app = fixture.debugElement.componentInstance;
|
||||||
|
expect(app.title).toEqual('app');
|
||||||
|
}));
|
||||||
|
it('should render title in a h1 tag', async(() => {
|
||||||
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
|
fixture.detectChanges();
|
||||||
|
const compiled = fixture.debugElement.nativeElement;
|
||||||
|
expect(compiled.querySelector('h1').textContent).toContain('Welcome to reactive-forms!');
|
||||||
|
}));
|
||||||
|
});
|
@ -1,9 +1,24 @@
|
|||||||
// #docregion
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
export type EditorType = 'name' | 'profile';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrls: ['./app.component.css']
|
styleUrls: ['./app.component.css']
|
||||||
})
|
})
|
||||||
export class AppComponent { }
|
export class AppComponent {
|
||||||
|
editor: EditorType = 'name';
|
||||||
|
|
||||||
|
get showNameEditor() {
|
||||||
|
return this.editor === 'name';
|
||||||
|
}
|
||||||
|
|
||||||
|
get showProfileEditor() {
|
||||||
|
return this.editor === 'profile';
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleEditor(type: EditorType) {
|
||||||
|
this.editor = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,45 +1,34 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
|
||||||
// #docregion v1
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { ReactiveFormsModule } from '@angular/forms'; // <-- #1 import module
|
import { NgModule } from '@angular/core';
|
||||||
|
// #docregion imports
|
||||||
|
import { ReactiveFormsModule } from '@angular/forms';
|
||||||
|
|
||||||
|
// #enddocregion imports
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
|
import { NameEditorComponent } from './name-editor/name-editor.component';
|
||||||
// #enddocregion v1
|
import { ProfileEditorComponent } from './profile-editor/profile-editor.component';
|
||||||
// #docregion hero-service-list
|
|
||||||
// add JavaScript imports
|
|
||||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
|
||||||
import { HeroService } from './hero.service';
|
|
||||||
// #docregion v1
|
|
||||||
|
|
||||||
|
// #docregion imports
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
// #enddocregion imports
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
HeroDetailComponent,
|
NameEditorComponent,
|
||||||
// #enddocregion v1
|
ProfileEditorComponent
|
||||||
HeroListComponent // <--declare HeroListComponent
|
|
||||||
// #docregion v1
|
|
||||||
],
|
],
|
||||||
// #enddocregion hero-service-list
|
// #docregion imports
|
||||||
imports: [
|
imports: [
|
||||||
|
// #enddocregion imports
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
ReactiveFormsModule // <-- #2 add to @NgModule imports
|
// #docregion imports
|
||||||
|
// other imports ...
|
||||||
|
ReactiveFormsModule
|
||||||
],
|
],
|
||||||
// #enddocregion v1
|
// #enddocregion imports
|
||||||
// export for the DemoModule
|
providers: [],
|
||||||
// #docregion hero-service-list
|
|
||||||
// ...
|
|
||||||
exports: [
|
|
||||||
AppComponent,
|
|
||||||
HeroDetailComponent,
|
|
||||||
HeroListComponent // <-- export HeroListComponent
|
|
||||||
],
|
|
||||||
providers: [ HeroService ], // <-- provide HeroService
|
|
||||||
// #enddocregion hero-service-list
|
|
||||||
// #docregion v1
|
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
|
// #docregion imports
|
||||||
})
|
})
|
||||||
export class AppModule { }
|
export class AppModule { }
|
||||||
// #enddocregion v1
|
// #enddocregion imports
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user