rendrjs / rendr

Render your Backbone.js apps on the client and the server, using Node.js.
MIT License
4.09k stars 312 forks source link

bootstrap.js #358

Closed BeshoyLouka closed 10 years ago

BeshoyLouka commented 10 years ago

How might you go about using bootstrap.js data-api with rendr ? I tried to make use of the PostRender to use some of twitter-bootstrap js but there has to be something that I am missing.

saponifi3d commented 10 years ago

If you can go about using twitter bootstrap in two different ways. The first way is to have the app bundle it (in any order) and then use the postRender function to initialize the JS.

The other is you can use the data attributes (which it sounds like you're trying to do) to attach them automatically. To use it in this manner it has to be included in your mergedAssets file before the views.

If you need any help making sure that it's being bundled correctly let me know, make sure to include your grunt file (or whatever build tool you're using's config).

saponifi3d commented 10 years ago

@BeshoyLouka are you still having issues with bootstrap.js?