I am new to Angular 2 & Angular 4 and working on a web app, that should display two components in the viewport, which are overlapping. When the application loads for the first time (onLoad), it should display the first component. The user can interact with the component then. When the user interacts with the viewport, another component - with the same reserved space as the first component - should be displayed. I am looking for an NgIf-/Else-Condition for something like this:
<component-1 *ngIf="windowOnload()" display component-1></component-1>
else display
<component-2></component-2>
I also need to implement some logic in the component, which details the condition; so the condition is:
When the window loads, display Component 1, else display Component 2. As I am new to Angular 2 & 4, any hints & code samples would be appreciated, thank you!