angular-foundation-6 icon indicating copy to clipboard operation
angular-foundation-6 copied to clipboard

any way to open and close the dropdown toggle programatically from my controller

Open ahmedBassell opened this issue 8 years ago • 1 comments

I am trying to make key board shortcut to open a dropdown toggle is there is a way to open and close the dropdown toggle programatically from my controller

it could be isOpen variable add in the directive and watched if change change $ctrl.active

<dropdown-toggle  is-open="<the model in my controller>">
    <toggle>
      <a class="dropdown button large">dropdown-toggles can also have links!</a>
    </toggle>
    <pane>
      <ul class="menu vertical">
        <li ng-repeat="(label, url) in linkItems">
          <a href="{{url}}" target="_blank">{{label}}</a>
        </li>
      </ul>
    </pane>
  </dropdown-toggle>

ahmedBassell avatar Nov 06 '16 11:11 ahmedBassell

Currently, the only way to open a drop down programmatically is to manually trigger a click event. The directive does expose a close function, it could expose an open function in the same way.

circlingthesun avatar Nov 13 '16 23:11 circlingthesun