7837 Commits

Author SHA1 Message Date
Alex Rickabaugh
a9099e8f70 fix(ivy): ensure Ivy *Ref classes derive from view engine equivalents (#25775)
Various user code uses 'instanceof' to check whether a particular instance
is a TemplateRef, ElementRef, etc. Ivy needs to work with these checks.

PR Close #25775
2018-09-11 06:53:22 -07:00
Alex Rickabaugh
96d6b79ada feat(ivy): resolve references to vars in .d.ts files (#25775)
Previously, if ngtsc encountered a VariableDeclaration without an
initializer, it would assume that the variable was undefined, and
return that result.

However, for symbols exported from external modules that resolve to
.d.ts files, variable declarations are of the form:

export declare let varName: Type;

This form also lacks an initializer, but indicates the presence of an
importable symbol which can be referenced. This commit changes the
static resolver to understand variable declarations with the 'declare'
keyword and to generate references when it encounters them.

PR Close #25775
2018-09-11 06:53:21 -07:00
Alex Rickabaugh
13ccdfd89d feat(ivy): support bootstrap in ngModuleDef (#25775)
The bootstrap property of @NgModule was not previously compiled by
the compiler in AOT or JIT modes (in Ivy). This commit adds support
for bootstrap.

PR Close #25775
2018-09-11 06:53:21 -07:00
Alex Rickabaugh
a0c4b2d8f0 fix(ivy): add @nocollapse when writing closure-annotated code (#25775)
Closure requires @nocollapse on Ivy definition static fields in order
to not convert them to standalone constants. However tsickle, the tool
which would ordinarily be responsible for adding @nocollapse, doesn't
properly annotate fields which are added synthetically via transforms.
So this commit adds @nocollapse by applying regular expressions against
code during the final write to disk.

PR Close #25775
2018-09-11 06:53:21 -07:00
Ben Lesh
7ba0cb7c93 refactor(ivy): remove superfluous Array check (#25894)
related #25755

PR Close #25894
2018-09-10 14:00:58 -07:00
Vikram Subramanian
d83f9d432a fix(common): register locale data for all equivalent closure locales (#25867)
This fix is for the issue below when compiling I18N Angular apps using closure.

For certain locales closure converts the input locale id to a different equivalent locale string. For example if the input locale is 'id'(for Indonesia) goog.LOCALE is set to 'in' and the closure locale data is registered only for 'in'. The Angular compiler uses the original input locale string, 'id' to set the LOCALE_ID token and there is a mismatch of locale used to register and locale used when requesting the locale data.

The fix is for the closure-locale.ts code to register the locale data for all equivalent locales names so that it doesn't matter what goog.LOCALE is actually set to.

PR Close #25867
2018-09-10 13:59:56 -07:00
Matias Niemelä
e3633888ed feat(ivy): support animation @triggers in templates (#25849)
PR Close #25849
2018-09-10 13:59:27 -07:00
Kara Erickson
91d79939be refactor(ivy): traverse tNode tree directly (#25872)
PR Close #25872
2018-09-10 09:59:17 -07:00
Miško Hevery
96eb79b1c7 build: add support for running builds outside of sandbox on Mac. (#25870)
Add following to your `~/.bazelrc`. This will run the build faster locally
(outside of sandbox), but continue running the builds with sandboxing
on CI.

```
build --spawn_strategy=standalone --strategy=ESM5=sandboxed
```
PR Close #25870
2018-09-07 16:06:55 -07:00
Kara Erickson
83a1334876 refactor(ivy): migrate previousOrParentNode to use TNodes (#25829)
PR Close #25829
2018-09-07 16:06:17 -07:00
Matias Niemelä
62be8c2e2f feat(ivy): allow combined context discovery for components, directives and elements (#25754)
PR Close #25754
2018-09-07 14:14:56 -07:00
Matias Niemelä
d2dfd48be0 feat(ivy): patch animations into metadata (#25828)
PR Close #25828
2018-09-07 13:46:06 -07:00
Alex Eagle
34ec9244a6 build: update to Node 10 (#25822)
PR Close #25822
2018-09-06 14:58:30 -07:00
Zhicheng Wang
739d61dbfa docs(API): 修正编译错误 2018-09-06 08:23:07 +08:00
Zhicheng Wang
b72d3c5083 docs(API): 翻译完了动画部分 2018-09-06 08:17:12 +08:00
Pete Bacon Darwin
d96e962da3 test(ivy): mock the filesystem in ngcc main() integration tests (#25557)
Bazel does not like the filesystem being modified.
This commit a temporary mock filesystem that can be modified as needed.

PR Close #25557
2018-09-05 11:35:47 -07:00
Pete Bacon Darwin
b0cb134815 feat(ivy): implement ngcc build marker (#25557)
`ngcc` adds marker files to each folder that has been
compiled, containing the version of the ngcc used.

When compiling, it will ignore folders that contain these
marker files, as long as the version matches.

PR Close #25557
2018-09-05 11:35:47 -07:00
George Kalpakas
2a672a97ab fix(upgrade): trigger $destroy event on upgraded component element (#25357)
Fixes #25334

PR Close #25357
2018-09-05 11:35:14 -07:00
George Kalpakas
71007ef9b2 refactor(upgrade): share code for destroying upgraded components between dynamic and static (#25357)
PR Close #25357
2018-09-05 11:35:14 -07:00
Trotyl
010e35d995 feat(router): warn if navigation triggered outside Angular zone (#24959)
closes #15770, closes #15946, closes #24728

PR Close #24959
2018-09-05 09:35:14 -07:00
Alex Rickabaugh
a417b2b419 fix(ivy): detect frozen flyweight objects in definitions and unfreeze (#25755)
defineComponent() and friends can return a flyweight EMPTY object for
specific fields when they contain no data. InheritDefinitionFeature
was attempting to write into these flyweight objects, which have been
protected with Object.freeze().

This commit adds detection to InheritDefinitionFeature to identify the
frozen objects.

PR Close #25755
2018-09-05 09:27:41 -07:00
Zhicheng Wang
cf01a7f5d4 docs(API): 翻译完了 Renderer2 2018-09-05 10:48:08 +08:00
Zhicheng Wang
d589eef668 docs(API): 翻译完了 test/async 2018-09-05 10:10:50 +08:00
Zhicheng Wang
9e40bf8e63 docs(API): 翻译完了 ValidatorFn 2018-09-05 10:08:10 +08:00
Zhicheng Wang
badf927f37 docs(API): 翻译完了 NgSelectOption 2018-09-05 09:46:21 +08:00
Zhicheng Wang
7b2226516a docs(API): 翻译完了 SimpleChange 2018-09-05 09:22:22 +08:00
Zhicheng Wang
7c7733c3af docs(API): 翻译完了 PipeTransform 2018-09-05 09:15:35 +08:00
Igor Minar
51c0d9cae9 style(ivy): remove unused ivy code (#25780)
PR Close #25780
2018-09-04 12:12:04 -07:00
Igor Minar
08dfbc5475 fix(ivy): reexport __POST_NGCC__ symbols as private to prevent DCE in FESM (#25780)
While creating FESM files, rollup usually drops all unused symbols.
All *__POST_NGCC__ are unused unless ngcc rewires stuff. To prevent this DCE
we reexport them as private symbols. If ngcc is not used, these symbols will
be dropped when we optimize an application bundle.

We don't have an infrastructure to test this fix, so I just manually inspected
the bundles before and after to verify that the fix works.

PR Close #25780
2018-09-04 12:12:04 -07:00
Alex Rickabaugh
cc29b9cf93 fix(ivy): use globally unique names for i18n constants (#25689)
Closure compiler requires that the i18n message constants of the form

const MSG_XYZ = goog.getMessage('...');

have names that are unique across an entire compilation, even if the
variables themselves are local to a given module. This means that in
practice these names must be unique in a codebase.

The best way to guarantee this requirement is met is to encode the
relative file name of the file into which the constant is being written
into the constant name itself. This commit implements that solution.

PR Close #25689
2018-09-04 12:09:29 -07:00
Zhicheng Wang
84f95e5864 docs(API): 翻译完了 DomSanitizer 2018-09-04 17:20:54 +08:00
Zhicheng Wang
8e6ce058ae docs(API): 翻译完了 ParamMap 2018-09-04 16:49:14 +08:00
Zhicheng Wang
ee075b2bbd docs(API): 翻译完了 QueryList 2018-09-04 16:42:02 +08:00
Zhicheng Wang
d9a50a8452 docs(API): 翻译完了 HttpResponse 2018-09-04 16:37:03 +08:00
Zhicheng Wang
2a1fbec879 docs(API): 翻译完了 forms/Form 2018-09-04 16:00:05 +08:00
Zhicheng Wang
0d7690251b docs(API): 翻译完了 ComponentFactory 2018-09-04 15:56:04 +08:00
Zhicheng Wang
8dbe7ff025 docs(API): 翻译完了 formatDate 2018-09-04 15:48:34 +08:00
Zhicheng Wang
284e6a7319 docs(API): 翻译完了 ChangeDetectorRef 2018-09-04 15:32:26 +08:00
Zhicheng Wang
3819d7de3b docs(API): 翻译完了 common/http 2018-09-04 15:04:47 +08:00
Zhicheng Wang
719650b41f docs(API): 翻译完了 CommonModule 2018-09-04 14:56:11 +08:00
Zhicheng Wang
a510ed5312 docs(API): 翻译完了 JsonPipe 2018-09-04 14:54:23 +08:00
Zhicheng Wang
adb6be6a02 docs(API): 翻译完了 SlicePipe 2018-09-04 14:50:06 +08:00
Zhicheng Wang
a033f25b13 docs(API): 翻译完了大部分路由器事件 2018-09-04 14:36:53 +08:00
Zhicheng Wang
0d7988992b docs(API): 翻译完了所有路由守卫 2018-09-04 14:04:10 +08:00
Zhicheng Wang
06368682ef docs(API): 翻译完了 HttpRequest 2018-09-04 13:55:45 +08:00
Zhicheng Wang
785aecb6dd docs(API): 翻译完了 HttpInterceptor 2018-09-04 13:33:50 +08:00
Zhicheng Wang
c3ec312159 docs(API): 翻译完了 FormControlName 2018-09-04 13:21:25 +08:00
Zhicheng Wang
201976fd31 docs(API): 翻译完了各个生命周期钩子 2018-09-04 12:32:48 +08:00
Zhicheng Wang
d1985fc7d1 docs(API): 翻译完了 HttpParams 2018-09-04 11:05:45 +08:00
Zhicheng Wang
82ba447ca0 docs(API): 翻译完了 FormBuilder 2018-09-04 10:47:31 +08:00