caitp / angular-semantic

AngularJS directives for Semantic-UI
413 stars 47 forks source link

Is there any example for dropdown.js ? #26

Open deepure opened 10 years ago

caitp commented 10 years ago

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.

JohnSmith0602 commented 10 years ago

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

caitp commented 10 years ago

@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.