Just learning Angular and javascript and took a first stab at a simple router. This for me was a leaning tool and a proof of concept and by no means production ready.
Some of the features:
- Animations
- Hierarchical views
- Simple fluent syntax for declaring your routes.
- Based on lightweight VisionMedia's page.js
```javascript
var app = angular.module('myApp', ['router']);
app.config(function ($routerProvider) {
$routerProvider.route('/').to(HomeController).using('HomeView.html').renderTo('contents');
$routerProvider.route('/players*').action(loadPlayers);
$routerProvider.route('/players').to(PlayersController).using('PlayersView.html');
$routerProvider.route('/messages').to(MessagesController).using('MessagesView.html');
$routerProvider.route('*').renderTo('subcontents');
$routerProvider.route('*').redirectTo('/');
});
```
Below is the github link:
Any feedback is welcome, enjoy,
Sandy Place