Yesod and Angular JS

Posted on June 23, 2014 by Christopher Reichert

Yesod Web Framework

Recently, while working on a Yesod site I wanted to integrate Angular JS to spice up the design and add dynamic content.

Researching Angular js and Yesod integration via search engines doesn’t yield many helpful results. Michael Snoyman has an example from 2012 (http://www.yesodweb.com/blog/2012/10/yesod-fay-js) with a module named Yesod.Angular provided for integrating Angular with a Haskell/Yesod backend. The problem is most of the code in the module was written against an older version of Yesod, and thus, does not compile with current versions.

I have proposed a pull request to update the example to work with Yesod 1.2, so those who stumble upon it are not confused or blocked. The pull request was merged and should be in the yesod-js repository now.

If you want to integrate the Yesod.Angular module into your project you will need to include it directly in your code. I am working to make this module usable as a library so feel free to comment with any suggestions.

The complete code can be found on Github

Happy Hacking!


comments powered by Disqus