Mykel
Mykel

Reputation: 29

How can i open ng bootstrap dropdown menu by default

Am trying to make the dropdown menu to show by default

<img src="assets/images/small-images/1.png" width="32px" id="dropdownForm1" ngbDropdownToggle>
<div ngbDropdownMenu aria-labelledby="dropdownForm1"                                    style="width: 200px; border-radius: 0px; margin-top: 28px;">
    <app-mega-menu></app-mega-menu>
</div>

Upvotes: 2

Views: 1892

Answers (1)

Saurabh Yadav
Saurabh Yadav

Reputation: 3386

set Input open to true

check out this demo may this will helps you!

open Defines whether or not the dropdown menu is opened initially.

Type: boolean

Default value: false

<div ngbDropdown class="d-inline-block" [open]="true">


</div>

Upvotes: 4

Related Questions