angular-semantic icon indicating copy to clipboard operation
angular-semantic copied to clipboard

Is there any example for dropdown.js ?

Open deepure opened this issue 10 years ago • 3 comments

deepure avatar Apr 01 '14 09:04 deepure

There is, on my local machine! I've yet to push it up to github because I have had very little time to work on this, and so the example isn't very fleshed out (and is probably broken if ngAnimate isn't included). But, it does (or did) look rather nice.

If you need a code example, I'll dig some up:

<dropdown transition="fade" class="dropdown red small icon button">
  <span>Menu</span>
  <i class="dropdown icon"></i>
  <div dropdown-menu>
    <div class="item">A</div>
    <div class="item">B</div>
  </div>
</dropdown>

There are things which aren't currently supported (or at least, that I recall, I might have fixed these at some point), such as nested dropdowns --- and it might be a tiny bit more declarative than you'd prefer. But it works rather nicely, for what it does.

So yeah there's no real JS involved, the api for dropdowns is all declarative at this point.

caitp avatar Apr 01 '14 13:04 caitp

Does this offer data-binding? I'm not a JS pro, yet I can't find ngModel anywhere.

JohnSmith0602 avatar Jun 09 '14 13:06 JohnSmith0602

@JohnSmith0602 currently the dropdown control only works declaratively, so you can't say <dropdown menu-items="someArray"></dropdown> or something, if that's what you mean.

However, pull requests are more than welcome. As I've explained to others, I haven't been actively hacking features together for this since joining the angular team, where most of my time is focused, but I'm happy to review and merge features for this library if anyone wants to take the time to improve it, either in some small way, or a bigger way.

I hope that's a bit helpful.

caitp avatar Jun 09 '14 14:06 caitp