Angular 7 beta.0 includes a new feature, namely, Angular Compatibility Compiler (ngcc).This new compiler helps convert the node_modules, which have been compiled with ngc, into node_modules that appear to have been compiled with ngtsc. This conversion, further, allows these “legacy” packages to be used by the Ivy rendering engine. Also, XMB placeholders (
Apart from the newly added compiler features, there are certain bug fixes included as well. In Bazel, compile_strategy() is now used to decide whether to build Angular code using ngc (legacy) or ngtsc (local). compile_strategy() is importable in Angular 7 beta.0 to enable g3 BUILD rules to switch properly. It also allows ivy testing in g3.
In Ivy, Template functions are no longer nested inside each other. The parent contexts are re-defined explicitly through an instruction, instead of nesting the functions and using closures to get parent contexts. This gets rid of the need to create multiple function instances for loops that are nested inside other loops. TView.components are no longer used for directive indices (just host element indices). The components array can be cut in half as the context for components is now being stored in the component’s LViewData instance.
There’s also a new instruction, reference() (r()) in Angular 7 beta.0. Earlier, closures were used to get access to local refs in parent views. With nested template functions being flat now; we need another way to walk the view tree. reference takes a nesting level, and the local ref’s index then walks the view tree to find the correct view and loads the local ref.w. from there.
Angular 7 beta.0 is now enabled with better error handling for @output in cases where the property is not initialized.