yesod-angular-0.1.0.0: Yesod AngularJS integration.

Safe HaskellNone

Yesod.Angular

Description

Yesod Angular JS Integration.

This module is based on Michael Snoyman's original work in the https://github.com/snoyberg/yesod-js repository.

Documentation

class Yesod site => YesodAngular site whereSource

Methods

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.

addCommand :: (FromJSON input, ToJSON output) => (input -> HandlerT site IO output) -> AngularT site TextSource

addCtrlSource

Arguments

:: Text

route pattern

-> Text

template name

-> Q Exp 

addCtrlRawSource

Arguments

:: Text

user-friendly name

-> Text

route pattern

-> HtmlUrl (Route site)

template

-> JavascriptUrl (Route site)

controller

-> AngularT site () 

type AngularT site = WriterT (AngularWriter site) (HandlerT site IO)Source