Releases: akhilarjun/RouteNow
Releases · akhilarjun/RouteNow
Added new routing strategy - using HTML5 History API
Added support for the HTML5 History API.
- Made the history API routing strategy as the default routing mechanism
- Added a new flag in the
optionsobject to support legacy hash routing strategy calleduseHashStrategy useHashStrategywill be set to false by default- If using the new routing strategy it is important to add a wildcard entry in the server configuration to route all traffic to your
index.html
The major version bump is to help the users identify the significance of routing strategy change.
Added $Router.hash() method
Added a $Router.hash() method that accepts an hash path.
This method should be used to elegantly change routes in browser url and navigate between different routes in a programmatic way.
The method also throws an error if valid hash path is not provided to it.
And will re-route to a default path if it is provided in config via otherwise path
Example
$Router.hash('home');
$Router.hash('#home'); // providing '#' before hash path is also acceptableBug Fix: Wrapped modules.export in an if block to support client side
modules.export was causing the code to break in browsers. So added an if block to prevent it from accidentally firing.
Common Module Export Support
- Added a common module export support.
- Removed the self invocation function model
Initial Release
This is a stable build. The js folder has both minified and non-minified versions of the library