Adds the route handler for the specified method and path within the Routing Table.
Syntax
var instance = new Router();
// Parameters
var method; // Type: String
var path; // Type: String
var route; // Type: String
instance.on(method, path, route);
function on(
: String,
: String,
: String
) : void;
Parameters
- method
- Method to insert within the Routing Table (e.g. on, get, etc.)
- path
- Path within the Routing Table to set the route to
- route
- Route handler to invoke for the method and path.
Browser Compatibility
See Also