User Tools

Site Tools



Controllers are managed by the haxe.web.Dispatch standard class.

Basic usage

//typed routes :   http://localhost/hello/Joe
function doHello( name:String ){
	view.text = “Hello ”+name;
//typed routes with record-macros objects : http://localhost/hello/1
function doHello( user:db.User){
	view.text = “Hello ”;

Learn more about how to use the Dispatch class

You can use the @tpl meta to define wich template to use for this action.

// http://localhost/user/edit/1
function doEdit( user:db.User){
    //do something..