1.0.15 • Published 8 years ago

sails-reverse-routing v1.0.15

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

sails-reverse-routing

Build Coverage Quality Dependencies

Ability to generate a uri given controller, action and arguments

Install

$ npm install sails-reverse-routing

Usage

Call reverseRouteService() anywhere like so:

   var arguments = [arg1, arg2];
   var components =  { controller: "someController.someMethod", args: arguments };
   var absoluteUrl = true;
   var link = reverseRouteService(components, absoluteUrl);

Set absoluteUrl to false to get a relative URI. The return value is an object with a 'uri' and a 'verb' property.

Tests

$ npm install
$ npm test
1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago