Hacker News new | past | comments | ask | show | jobs | submit login
AngularStrap v2.0 (mgcrea.github.io)
206 points by olouv on April 8, 2014 | hide | past | favorite | 41 comments



We use the semi-official angular ui bootstrap library (http://angular-ui.github.io/bootstrap/)

Out of curiosity what does this give you over that?


Author here, the main difference is that AngularStrap has been rewritten from the ground up to leverage ngAnimate that came with AngularJS 1.2+, so it's leaner and brings way more flexibility on widget view lifecycle. When ngAnimate gets better thanks to the work of the core team, AngularStrap gets better too! For instance v1.2.9 brought requestAnimationFrame support to ngAnimate, every AngularStrap directive got smoother thanks to it. Both project have no external dependency, only the Bootstrap CSS styles.


They are semi-competitive projects. At some point there were talks of combining 2 projects into one under https://github.com/angular-widgets . But guys have failed to agree on core architectural decisions.

Personally, I've started with with UI-Bootstrap, but then started to migrate certain components on Angular-Strap. The reasons was that some components like popover with template support were more functional in Angular-Strap. Also https://github.com/mgcrea/bootstrap-additions & https://github.com/mgcrea/angular-motion are nice side-benefits.

UI-Bootstrap development is not as active as it used to be.


From the other side, in a recent Javascript Jabber podcast with Dean Sofer (Feb 7th, 2014), around 16 minutes in they discuss the difference

Edit: Link => http://javascriptjabber.com/095-jsj-angularui-with-dean-sofe...


Having wasted most of yesterday dealing with the bootstrap JS implementation of scrollspy, which isn't on that list, but is on the angularstrap list ... possibly that?

I am entirely uninformed here but am going to try replacing the patched version of bootstrap's idiotic scrollspy code with angularstrap's at some point since my local patches are almost as horrible as the original code was.


Same here. Using angular ui at the moment, but I'm tempted to switch to angular strap seeing this.

I wonder the opposite though: does anyone know what the current angular strap does NOT have, but angular ui does?


We use Bootstrap UI as well. We found out that one thing AngularStrap does is allow for (inline) templating in tooltip content, and Bootstrap UI doesn't.


Modals seem to be much more streamlined. I'm curious what others think here.


Agreed. The modals in Angular-UI (which I use) don't seem very AngularJS-ish: the Modal controller creates the ModalInstance controller? I googled for a bit to make sure that I really had to create two controllers in order to manage one dialog. Also, $scope management in AngularUI-Bootstrap dialogs seems a bit wonky.


I found that confusing as well.


This requires you to use jQuery and the Bootstrap scripts, whereas UI Bootstrap does not require those at all, thus allowing you to go leaner. The code for UI Bootstrap is architected much better than Angularstrap in general.

I usually recommend against using Angularstrap and just using UI Bootstrap.


That's not true: "With no external dependency except the Twitter Bootstrap CSS styles, AngularStrap is lighter and faster than ever as it does leverage the power of ngAnimate from AngularJS 1.2+!". Please do read the docs.


Huh, that must've changed recently then. It certainly was not true for a long time.

But aside from that, I usually don't recommend it in part because I have heard that a lot of effort was expended in trying to reach out to mcgrea to put forth a joint community effort in maintaining a singular project, but mcgrea wasn't really interested in doing so, wanting to maintain total control in many respects. The codebase certainly suffered from that decision for a long time (and for a long time it wasn't well maintained either - not sure about its current state).


That's not true either, I (mgcrea) was more than happy to merge efforts with the UI team. We started a joint repository with the UI-team and I did commit a lot (time, work, PRs) there. Unfortunately the UI team did not have the time (or will) to debate and work on it at the time, several months passed, I ended up quite alone there and finally we decided to part our ways. UI team got back to work on their existing codebase, and the work I had made there (several PRs) became the initial seed for the AngularStrap v2 full rewrite.

Have a look at the (dead) issue tracker if you're interested by the insights : https://github.com/angular-widgets/angular-bootstrap/issues?...


"have heard"? This sounds like FUD to me. For the record, I am using Angular UI bootstrap but am thinking of switching mainly because a) It doesn't look like it is being actively maintained b) The animation used in AngularStrap demos make it look quite slick c) The port looks straightforward


This is not true anymore. Angular-Strap 2.0 does not required jQuery and Bootstrap JS dependencies.


This is cool! React (by Facebook) has something similar. http://react-bootstrap.github.io/components.html


Call me old fashioned if you like, but shouldn't 'About This Project' actually tell me what it is?


Updated the docs to add a more descriptive tagline, thanks for the feedback.


Much better :)


It's in the header

> AngularJS 1.2+ native directives for Twitter Bootstrap 3.


so.. what is it?


AngularStrap is a set of native directives that enables seamless integration of Twitter Bootstrap 3.0+ into your AngularJS 1.2+ app.


Look great! We're currently not using Angular on our frontend, but this looks like a great way to squeeze more juice out of Bootstrap. I'll definitely check this out for future frontends :)


This looks very nice. The only thing that's a little confusing is that you provide a "Typeahead" component, but that was removed from Bootstrap 3 in favor of Twitter's standalone library which is also called Typeahead. I think it's great to provide the functionality (and clever to do it with Tooltip), but wonder if it should be called something else. (Autocomplete? Tipahead?)

Also, it would be nice if you used the inline annotation syntax (['foo', function (foo) {}]) to make the code minifiable.


The distributed code is parsed by gulp-ngmin so you can minify it safely: https://github.com/mgcrea/angular-strap/blob/master/dist/mod...


Angularstrap left a sour taste in my mouth when their Bootstrap 3 support took so long.

In that respect using bootstrap3 + backbone is a better option.


Not sure if it's intentional or not, but on the Timepickers example the "Time (as a number)" live demo cannot be updated. Doesn't work for me in FF or Chrome.

http://mgcrea.github.io/angular-strap/##timepickers

This whole thing looks really, really, nice. Kudos.


Great to see a number of alternative solutions emerging! We've been using BS3 with a patched version of AngularUI for a few months now without any problems at https://starthq.com. Using Angular with AngularUI means we no longer need to include jQuery as a dependency.


As much as I do like and appreciate Bootstrap, I don't use it for all (or even most) of my work. I wish these directives, or at least the ones where this could make sense, weren't so dependent on it.


You can use totally custom templates for every directive and it should basically work out of the box for most of them (with some proper CSS style of course).


Thanks, I'll check that out then. Looking for something for calendar fields specifically.


ngAnimate is a nice touch on top of vanilla twitter bootstrap.


As a frontend dev who isn't using Angular I'm a little jealous I can't readily make use of this! It's the subtle details that add a lot and I believe that in 2014 (and beyond), users are so used to those animations and niceties found in native apps that they expect them at this point. If we can bring that same level of polish to our web apps then everybody wins!


On Chrome for Android the onscreen keyboard never came up for Typeahead. Otherwise this looks outstanding. Nice work.


This is great! Does anyone know if something similar exists for Ember?


Would be nice to have a mobile optimized version of date picker.


You can use the "useNative" option, `data-use-native="1"` to active a fully native component if available (iOS/Android).


p.s. the documentation link on your related 'bootstrap-additions' project is not working. I'm looking for a demo :)


the documentation does not mention which browsers are supported / tested. Is it IE8+ or IE9+?


Angular's trap.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: