Skip to content

nmabhinandan/gully

Repository files navigation

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

About

a lightweight client-side router written in ECMAScript 6

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published