angular/angular.js — pull request #1901 by gaiottino (2013-01-28 15:15:05+00:00)
Title: Route functions (no templates)

Hi,

I've committed a change that gives us the possibility to add routes that will just evaluate a function when matched instead of rendering a template. I hope you find it useful and bring it into master as it really helped us when refactoring a project into angular and I'm surprised it something that hasn't been implemented yet (if it has, please show me how)

One could basically do something like

```javascript
angular.module('example', [], function($routeProvider) {
$routeProvider.when('/foo', {fn: function() {
console.log('foo!')
}});
$routeProvider.when('/bar/:id', {fn: function(params) {
console.log('bar! with params ' + params)
}});
});
```

Regards