I am getting an issue with angular-2 while changing the condition to false. initially the div is set to 'true' later when i am changing the condition to false the total page is getting reloaded, output is coming as i expected but facing the reloading issue?
Here is my code
In html
<div class="container" *ngIf="mymenu.id === expandItem">
<form class="form-horizontal" #myform="ngForm">
<div class="row">
<div class="col-md-9 input-group-md form-group">
<input type="text" ngControl="itemname" [(ngModel)]="items.itemname" class="form-control" autocomplete="off" placeholder="Item Name">
</div>
<div>
<button type="submit" class="btn btn-success" (click)="add(mymenu);">
Save</button>
</div>
</form>
</div>
In the component i am changing the expandItem to false.therefor in the *ngif is false the div has to hide. tried different ways,Relaoding Issue?