angular-docs-cn/packages/compiler-cli/test/ngtsc
Paul Gschwendtner aca339e864 fix(ivy): unable to project into multiple slots with default selector (#30561)
With View engine it was possible to declare multiple projection
definitions and to programmatically project nodes into the slots.

e.g.

```html
<ng-content></ng-content>
<ng-content></ng-content>
```

Using `ViewContainerRef#createComponent` allowed projecting
nodes into one of the projection defs (through index)

This no longer works with Ivy as the `projectionDef` instruction only
retrieves a list of selectors instead of also retrieving entries for
reserved projection slots which appear when using the default
selector multiple times (as seen above).

In order to fix this issue, the Ivy compiler now passes all
projection slots to the `projectionDef` instruction. Meaning that
there can be multiple projection slots with the same wildcard
selector. This allows multi-slot projection as seen in the
example above, and it also allows us to match the multi-slot node
projection order from View Engine (to avoid breaking changes).

It basically ensures that Ivy fully matches the View Engine behavior
except of a very small edge case that has already been discussed
in FW-886 (with the conclusion of working as intended).

Read more here: https://hackmd.io/s/Sy2kQlgTE

PR Close #30561
2019-05-31 09:52:32 -07:00
..
fake_core refactor(ivy): Move instructions back to ɵɵ (#30546) 2019-05-20 16:37:47 -07:00
BUILD.bazel build(bazel): back out of @bazel/jasmine 0.27.7 with shard count (#29444) 2019-03-21 09:59:13 -07:00
env.ts test: fix tests in windows ci (#30451) 2019-05-14 10:35:55 -07:00
incremental_spec.ts feat(ivy): skip analysis of unchanged components (#30238) 2019-05-10 12:10:40 -07:00
ngtsc_spec.ts fix(ivy): generate explicit type annotation for NgModuleFactory calls in ngfactories (#30708) 2019-05-30 15:09:56 -04:00
scope_spec.ts refactor(ivy): Move instructions back to ɵɵ (#30546) 2019-05-20 16:37:47 -07:00
sourcemap_utils.ts feat(ivy): add source mappings to compiled Angular templates (#28055) 2019-02-12 20:58:28 -08:00
template_mapping_spec.ts fix(ivy): unable to project into multiple slots with default selector (#30561) 2019-05-31 09:52:32 -07:00
template_typecheck_spec.ts fix(ivy): template inputs/outputs should not be bound in template scope (#30669) 2019-05-30 15:17:07 -04:00