5

I've just came with a SO answer mentioning that Foundation and AngularJS do not play well together.

That raises the question: When deciding between Bootstrap and Foundation, do any of them integrate better with MVC frameworks? Or is it just AngularJS case since it takes over so many things?

Foundation and Bootstrap provide their own widgets, and AngularJS might be take over more things beyond plain MVC (like Backbone). Is there any consideration regarding freedom to chose MVC frameworks?

As plain grid framework, I really like Foundation, but I am concerned if the popularity of Bootstrap can provide a road with less surprises when combining other projects.

Community
  • 1
  • 1
SystematicFrank
  • 16,555
  • 7
  • 56
  • 102
  • it's not that they don't play well together, it's that you can't use auto initialization methods since angular's interaction with the DOM is far more involved and complex than the widget framework's is. Can use angular directives however to implement third party DOM manipulation fairly easily. As for CSS...use anything you want. – charlietfl Nov 13 '13 at 13:39

3 Answers3

5

AngularJS is a different beast when compared to other frontend MV* frameworks (Backbone at least) due to the way it manipulates the DOM, much of the javascript from projects like Foundation and Bootstrap becomes obsolete.

The angular-ui team have an angular-bootstrap project, one of the aims is to reimplement the Bootstrap widgets in a via Angular directives, the javascript has been rewritten. A side effect is that those directives can easily be applied to other frontend ui frameworks, such as Foundation, by merely providing a new html template. For example, tabs or an accordion have the same functionality regardless of framework, once you implement the functionality in AngularJS you can apply any template and it still works the same.

There a very interesting google groups post that explains the reasons in more detail.

If you want to use AngularJS, until the Foundation widgets have been integrated with angular-bootstrap, a potential middle way would be using Foundation css for layout with angular-bootstrap widgets.

cerberos
  • 7,705
  • 5
  • 41
  • 43
1

If you are going to work with Angular, in my view go with BootStrap. There is even a openSource project called AngularStrap which combines bootstrap css classes in to directives. Have a look here. This in my opinion integrates better with Angular

Anand
  • 14,545
  • 8
  • 32
  • 44
  • AngularStrap does some great work with integrating the two, but I must mention that while I find both AngularJS and Twitter Bootstrap very well-written, and in my experience work great together, AngularStrap contains a lot of bugs, leaks, and inconsistencies, that in my opinion do not make it worthwhile yet. – Steve Klösters Nov 13 '13 at 10:17
  • Thanks for information @stevuu. I have personally not used AngularStrap in extended way. I only have played with it for some demo apps. – Anand Nov 13 '13 at 10:22
  • 1
    I used Angular as an example, but my question was more broad. However I did found AngularUI very sexy: http://angular-ui.github.io/bootstrap/ – SystematicFrank Nov 13 '13 at 10:58
0

It's still being developed, but I'm using angular with the angular-foundation project and it seems solid. Angular does stomp on foundation a bit so it's not ideal.

Dan
  • 43
  • 6