angular/angular.dart — pull request #525 by pavelgj (2014-02-07 21:42:11+00:00)
Title: feat(routing): new DSL and deferred module loading

Introduced new routing DSL that allows adding new modules for views.

```dart
views.configure({
'foo': ngRoute(
path: '/foo',
view: 'foo.html',
enter: (RouteEnterEvent e) => enterFoo(e),
mount: {
'bar': ngRoute(
path: '/bar',
view: 'bar.html',
preEnter: (RoutePreEnterEvent e) => checkIfCanEnterBar(e),
),
'baz': ngRoute(
path: '/baz',
view: 'baz.html',
leave: (RouteLeaveEvent e) => checkIfCanLeaveBaz(e),
)
}
),
'aux': ngRoute(
path: '/aux',
view: 'foo.html',
defaultRoute: true
)
});
```

Modules can be loaded synchronously

```dart
views.configure({
'foo': ngRoute(
path: '/foo',
modules: () => [
new Module()..type(NewDirective)
],
view: 'foo.html'
),
});
```

or asynchronously, for example in case of deferred library loading:

```dart
views.configure({
'foo': ngRoute(
path: '/foo',
modules: () => new Future.value([
new Module()..type(NewDirective)
]),
view: 'foo.html'
),
});
```

Fixes #435