Seanmclem / shapelessRouter

simpe JS/Jquery page router

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shapeless Router

simpe JS/Jquery page router

  • -a js/jquery based page router
  • Built for C# / MVC/ APS .NET, but should work for other Controller-Action-APIs

Basics

You direct to certian controllers and actions using URLs containing Hash signs (#) The controller or API call should return your HTML page

The default controller automatically pointed to by the router is "Home", so if you don't add another Controller name before your action name -it will look for your action in the "HomeController". For example "home/SimpleAction"

```html Simple Action ```

You can add query paremeters right in your URL like you nomally would. These get passed into the controller action as they are named

<a href="#hashQuery?param1=test1&param2=test2&param3=test3">Query Strings</a>

If you want to direct to a controller other than "Home", you can just add that before your Action after the "#", using a "/" to seperate controller/action names

<a href="#FormGenerator/hashQuery">Different Controller</a>

About

simpe JS/Jquery page router

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%