Route

APIAppRoute

Source

Route.getTemplateComponent(componentName)

Parameters:
  • componentName — String
Returns:
Document

Source

Route::constructor(options)

Parameters:
  • options — Object

Access it with:

module.exports = function(app) {
    var Route = app.Route;
};

Acceptable syntaxes:

*Route* app.Route(*String* method, *String* uri, *Object* options)
*Route* app.Route(*String* methodWithUri, *Function* getData)
*Route* app.Route(*String* methodWithUri, *Object* options)
*Route* app.Route(*String* uri, *Function* getData)
*Route* app.Route(*String* uri, *Object* options)
*Route* app.Route(*String* method, *String* uri)
*Route* app.Route(*String* uri)
*Route* app.Route(*String* methodWithUri)

Source

Route::method

Type:
String
Default value:
'get'

Route::uri

Type:
Networking.Uri

Route::app

Type:
App

Route::route

Type:
App.Route

Route::name

Type:
String

Route::schema

Type:
Schema

Route::data

Type:
Any

Route::error

Type:
Any

Route::factory()

Returns:
Function

Route::init()

Returns:
Function

Route::getData(callback)

Parameters:
  • callback — Functionoptional
Returns:
Function

Route::destroy()

Returns:
Function

Route::destroyJSON()

Returns:
Function

Route::destroyText()

Returns:
Function

Route::destroyHTML()

Returns:
Function

Route::redirect

Type:
Networking.Uri

Can be also a function. May returns a Networking.Uri, any String or undefined.

Route::request

Type:
Networking.Request

Route::response

Type:
Networking.Response

Route::next()

Returns:
Function

Source

Route::toJSON()

Returns:
Any

Source

Route::toText()

Returns:
String

Source

Route::toHTML()

Returns:
Document

Source