I was working on a app where I encountered a peculiar case. For simplicity I have created a sample app and tested this although the behaviour was same.

Sample app:

In the parent component(my-app) I have the same child component with *ngIf and without it. The condition in *ngIf is mentioned upfront but despite it as you can see the method [check()] associated with it is executed last.

enter image description here

Excepted: The Method Check() should execute first and then Check2()

0

There are 0 best solutions below