Just Simply use show_hide_div:boolean = false; in ur ts file it will hide the div when ur component is load
after that u can do like this
show_hide_div:boolean = false;
one(){
this.show_hide_div = true;
console.log("one method");
}
two(){
this.show_hide_div = true;
console.log("two method");
}
three(){
this.show_hide_div = true;
console.log("three method");
}
and here is the Html file just add like this *ngIf="show_hide_div"
<div ngbDropdown class="d-inline-block ml-3">
<button class="btn btn-outline-success" id="dropdownBasic1" ngbDropdownToggle>Login</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1" [(ngModel)]="partnerValue" ngDefaultControl>
<button ngbDropdownItem value="one" (click)="one(e)">One</button>
<button ngbDropdownItem value="two" (click)="two()">Two</button>
<button ngbDropdownItem value="three" (click)="three()">Three</button>
</div>
</div>
<div *ngIf="show_hide_div">
Show if any of the above button is selected.
</div>
Here is the Example you can edit or preview code Here On Stackblitz with *ngIf
And another Way you can do like this with hidden attribute
[hidden] is a special case binding to hidden property.
It is closest cousin of ng-show and ng-hide.
when ur component is load it hide the div with show_hide_div:boolean = true;
here is change the boolean value
show_hide_div:boolean = true;
one(){
this.show_hide_div = false;
console.log("one method");
}
two(){
this.show_hide_div = false;
console.log("two method");
}
three(){
this.show_hide_div = false;
console.log("three method");
}
check with hiddenattribute example on Stackblitz