Skip to content

Giorgospago/routes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Routes.js

Simple Routing System for IEK ΔΕΛΤΑ Students

Install

Include the script in your project

<script src="//develobird.gr/routes.js"></script>

Use

Write in your javascript file the following

Routes({
  "/": function(){
    alert("You are at home path");
  },
  "users": function(){
    alert("You are at users path");
  },
  "users/:user_id": function(){
    alert("You are watching the user with id " + UrlParams.user_id);
  },
  default: "/"
});

Demo

https://www.develobird.gr/demo-routes.html

About

Simple Routing System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published