Hi Sanjit,
did you already check out the Angular 2 tutorial on angular.io? They cover a lot of typical examples and they explain things very clearly.
In this case, take a look at the
Master/Detail part[
^] and search for "Hide the empty detail with
ngIf"
This code only shows a div, if the selectedHero property is set.
<!--
<div *ngIf="selectedHero"></div>
onSelect(hero: Hero) { this.selectedHero = hero; }
Hope this helps. If you have further questions, feel free to ask.