Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Foundation and AngularJS

I am modifying an application using Zurb's Foundation framework for responsiveness and AngularJS. There is a bug where data displayed in a table with <tr ng-repeat="obj in entries">...</tr> has <td>'s which are hidden/shown based on Foundation's responsive rules. Unfortunately, when the angular model is updated, Foundation doesn't re-flow the newly rendered DOM.

I have tried using $(document).foundation('table') as I found in extensive google searching, but this didn't actually trigger a reflow of the responsive collapsed table. I also added a directive to trigger a simple $(window).trigger('resize') which works for the first call, but any subsequent calls do not.

Anybody else run into this?

like image 377
John F Avatar asked Aug 07 '13 15:08

John F


People also ask

Which framework is used for AngularJS?

Ionic. Ionic is one of the most widely used Angular frameworks. It is a cross-platform, open-source framework utilized for developing hybrid mobile applications.

What is difference between Bootstrap and AngularJS?

AngularJS is widely used for single page application development as it provides MVC architecture with data model binding. On the other hand, Bootstrap uses HTML, CSS, and JavaScript for its development which makes it comparatively faster.

Is Netflix made with Angular?

Netflix uses Angular to constitute animation and different themes to each of its streaming options so that it always has a modern feel and a dynamic user interface to fit different user needs and preferences. The web application is arguably the most popular freelance portals available today.

Is AngularJS is a framework?

AngularJS is a JavaScript framework. It can be added to an HTML page with a <script> tag.


3 Answers

Angular UI Bootstrap was not completely framework agnostic so we had to do some modifications to adapt it to Foundation. You can see the result and code here: http://madmimi.github.io/angular-foundation/.

like image 159
sorich87 Avatar answered Nov 15 '22 08:11

sorich87


You are mixing two technologies that dont play nice together.

The JS assets provided by Zurb Foundation will inevitably have conflicts with the digest cycle in AngularJS. For this reason --- Angular-Bootstrap projects emerged to transform jquery plugins into AngularJS directives.

http://angular-ui.github.io/bootstrap/

I don't believe the same level of support, "if any", is offered for Zurb Foundation.

like image 45
Dan Kanze Avatar answered Nov 15 '22 08:11

Dan Kanze


You are not forced to use Bootstrap with Angular all the times.

You can use this project here http://madmimi.github.io/angular-foundation/ which tries to do the same as UI BOOTSTRAP.

Also you can reference this thread Using Zurb Foundation Interchange with AngularJS

Hope this helps!

like image 43
Alejandro Nanez Avatar answered Nov 15 '22 08:11

Alejandro Nanez