Skip to content

Latest commit

 

History

History
48 lines (40 loc) · 1.51 KB

readme.md

File metadata and controls

48 lines (40 loc) · 1.51 KB

Gully.js (WIP)

Modern, lightweight client-side router written in ECMAScript 6

Build Status Code Climate GitHub issues Test Coverage GitHub license JS.ORG

Usage

var gully = new Gully();

gully.state({
    name: 'home',
    url: '/',
    templateUrl: 'templates/home.html',
    controller: homeCtrl
}).state({
    url: '/about',
    templateUrl: 'templates/about.html',
    controller: aboutCtrl
}).state({
    name: 'user',
    url: '/user/:uid',
    templateUrl: 'templates/user.html',
    controller: userCtrl
}).state({
    name: 'post',
    url: '/post/:pid',
    templateUrl: 'templates/post.html',
    controller: postCtrl
}).state({
    url: '/404',
    templateUrl: 'templates/404.html'
}).init();

Todo:

  • HTML5 History API implementation
  • Sub states
  • More tests