NgbDropdownToggle is not optional

Angular: 4.4.6
ng-bootstrap: 1.0.0-beta.5
Bootstrap: 4.0.0-beta.2

Documentation states that NgbDropdownToggle directive is optional, yet instantiating an NgbDropdown without an NgbDropdownToggle within it leads to poorly positioned drop-down.

Quick glance at the source code suggests positioning of menu element is skipped when NgbDropdown._toggle is undefined. See dropdown.ts, line 195.

1 possible answer(s) on “NgbDropdownToggle is not optional

  1. It would be convenient to have a base directive, say, NgbDropdownAnchor, to designate an element as the positioning anchor for the drop-down, but without the functionality for toggling on click. For instance, one could want to toggle on focus in/out. So NgbDropdownToggle would be optional, as one among a number of possible anchoring directives, but any one anchoring directive would be required in every drop-down.