yesod-angular-0.1.0.2: Angular JS integratoin

Copyright(c) 2014-2015, Christopher Reichert
LicenseBSD3
MaintainerChristopher Reichert <creichert@reichertbrothers.com>
Stabilityunstable
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Yesod.Angular

Description

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

Synopsis

Documentation

class Yesod site => YesodAngular site where Source

YesodAngular wraps a widget in an ng-app named modname

Minimal complete definition

Nothing

Methods

urlAngularJs :: site -> [Either (Route site) Text] Source

Default instance loads `angular.min.js` and `angular-route.min.js` from cloudflare cdn.

wrapAngular :: Text -> WidgetT site IO () -> HandlerT site IO Html Source

wrapAngular wraps widget in an ng-app named modname.

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

addCtrl Source

Arguments

:: Text

route pattern

-> Text

template name

-> Q Exp 

addCtrlRaw Source

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