GithubHelp home page GithubHelp logo

Comments (9)

pkozlowski-opensource avatar pkozlowski-opensource commented on May 20, 2024

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?

from bootstrap.

petebacondarwin avatar petebacondarwin commented on May 20, 2024

Actually, I really like the idea of

<button toggle ng-model="some.value"></button>

or

<toggle-button ng-model="some.value"></toggle-button>

On 11 January 2013 18:58, Pawel Kozlowski [email protected] wrote:

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.


Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-12158283.

from bootstrap.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 20, 2024

@petebacondarwin and you are telling it just now??? :-) No, but seriously, what do we do about this thing?

from bootstrap.

petebacondarwin avatar petebacondarwin commented on May 20, 2024

I honestly think it is worthy. It would have to plug into ng-model though.

from bootstrap.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 20, 2024

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

from bootstrap.

petebacondarwin avatar petebacondarwin commented on May 20, 2024

Well you should read this issue then also: angular/angular.js#1199 (comment)

from bootstrap.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 20, 2024

Yep, had this one on my mind as well :-)

from bootstrap.

ajoslin avatar ajoslin commented on May 20, 2024

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: button-group copying <input type="radio"> (ng-model, value) and button-toggle copying <input type="checkbox"> (ng-model, ng-checked)

from bootstrap.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 20, 2024

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!

from bootstrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.