1.0.3 • Published 7 months ago

pict-router v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Pict Router

Leverages the navigo https://www.npmjs.com/package/navigo router to provide browser URL parsing. Right now the routes parsed are triggered by the part of the URL after the anchor # symbol.

So for instance the route /index.html?term=dogs#/Views/Legal would be the route /Views/Legal within the router.

Templates as String-based Routes

If you call PictRouter.addRoute(pRoute, pRouteFunction) the route will be parsed in the traditional navigo manner. However, if a string is passed in (e.g. this one from the tests: "{~LV:Pict.providers.PictRouter.adjustTestState(Record.data.Scope)~}"

This will execute the LogValue template expression on the provider function address.

This means the function address gets called.

This can be used to call view render() functions as well as other custom or app-specific behaviors.

1.0.2

8 months ago

1.0.3

7 months ago

1.0.1

10 months ago