Safe Haskell | None |
---|
Yesod Angular JS Integration.
This module is based on Michael Snoyman's original work in the https://github.com/snoyberg/yesod-js repository.
- This module currently defaults to Angular 1.2.18. Use
urlAngularJs_
specify your own Angular location. * Example can be found at: https://github.com/snoyberg/yesod-js/tree/master/yesod-angular * Currently, this module looks for controllers in the `templates/angular` directory.
Documentation
class Yesod site => YesodAngular site whereSource
urlAngularJs :: site -> [Either (Route site) Text]Source
Default instance loads `angular.min.js` and `angular-route.min.js`.
wrapAngular :: Text -> WidgetT site IO () -> HandlerT site IO HtmlSource
wrapAngular
wraps widget in an ng-app named
modname.
runAngular :: YesodAngular site => AngularT site () -> HandlerT site IO HtmlSource
addCommand :: (FromJSON input, ToJSON output) => (input -> HandlerT site IO output) -> AngularT site TextSource
setDefaultRoute :: Text -> AngularT site ()Source