-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Add a directive for the button toggle #53
Comments
OK, from the discussion on the pull request this doesn't make much sense as a directive, really. The question would ne then - do we want to add demo snippets to the documentation page. So, even if we don't offer any directives we could at least show people how to turn bootstrap's markup into a dynamic, AngulaJS-powered version. So the question here is the following one: do we want to have those mini-demos on the demo page, mixed with other directives? |
Actually, I really like the idea of
or
On 11 January 2013 18:58, Pawel Kozlowski notifications@github.com wrote:
|
@petebacondarwin and you are telling it just now??? :-) No, but seriously, what do we do about this thing? |
I honestly think it is worthy. It would have to plug into ng-model though. |
@petebacondarwin ok, it really feels like it is close to a check-box. So maybe it should also support things like true-value and false-value (those should be booleans by default). |
Well you should read this issue then also: angular/angular.js#1199 (comment) |
Yep, had this one on my mind as well :-) |
Yeah, I guess we could add this since bootstrap has it. It does sound kind of attractive .. it's just kinda funny making a directive for something that is a few words of html attributes in angular. If we do make it, we should make the apis copy native angular directives: |
OK, another try here: http://plnkr.co/edit/cccFMc3qmNgKCr7inUX3?p=preview AngularJS is simply awesome! Could anyone could explain to me how come AngularJS version of reusable component has 1/3 size of the original code (https://github.com/twitter/bootstrap/blob/master/js/bootstrap-button.js)??? Not to mention the fact that it doesn't require any wrappers!!! Will prepare a PR tomorrow but if anyone from @angular-ui/bootstrap could have a quick look it would be awesome! |
Something to ease working with:
http://twitter.github.com/bootstrap/javascript.html#buttons
The proposal for the markup:
to mimic the existing dropdownToggle.
The directive should be extremely simple and should:
active
class to the button based on model changesWDYT?
The text was updated successfully, but these errors were encountered: