Skip to content

Commit

Permalink
fixup! feat(ivy): support lifecycle hooks of ViewContainerRef
Browse files Browse the repository at this point in the history
  • Loading branch information
marclaval committed Apr 25, 2018
1 parent c460570 commit 8dc9705
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/render3/instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ export function enterView(newView: LView, host: LElementNode | LViewNode | null)
*
* @param newView New state to become active
* @param creationOnly An optional boolean to indicate that the view was processed in creation mode
* only, i.e. the first update will be done later
* @returns the previous state
* only, i.e. the first update will be done later. Only possible for dynamically created views.
*/
export function leaveView(newView: LView, creationOnly?: boolean): void {
if (!creationOnly) {
Expand Down
12 changes: 8 additions & 4 deletions packages/core/test/render3/lifecycle_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2466,12 +2466,16 @@ describe('lifecycles', () => {
function Template(rf: RenderFlags, ctx: any) {
if (rf & RenderFlags.Create) {
elementStart(0, 'parent');
elementStart(1, 'content');
elementEnd();
{
elementStart(1, 'content');
elementEnd();
}
elementEnd();
elementStart(2, 'parent');
elementStart(3, 'content');
elementEnd();
{
elementStart(3, 'content');
elementEnd();
}
elementEnd();
}
if (rf & RenderFlags.Update) {
Expand Down

0 comments on commit 8dc9705

Please sign in to comment.