angular/modules/angular2/src
Brian Ford 6ddfff5cd5 refactor(router): improve recognition and generation pipeline
This is a big change. @matsko also deserves much of the credit for the implementation.

Previously, `ComponentInstruction`s held all the state for async components.
Now, we introduce several subclasses for `Instruction` to describe each type of navigation.

BREAKING CHANGE:

Redirects now use the Link DSL syntax. Before:

```
@RouteConfig([
	{ path: '/foo', redirectTo: '/bar' },
	{ path: '/bar', component: BarCmp }
])
```

After:

```
@RouteConfig([
	{ path: '/foo', redirectTo: ['Bar'] },
	{ path: '/bar', component: BarCmp, name: 'Bar' }
])
```

BREAKING CHANGE:

This also introduces `useAsDefault` in the RouteConfig, which makes cases like lazy-loading
and encapsulating large routes with sub-routes easier.

Previously, you could use `redirectTo` like this to expand a URL like `/tab` to `/tab/posts`:

@RouteConfig([
	{ path: '/tab', redirectTo: '/tab/users' }
	{ path: '/tab', component: TabsCmp, name: 'Tab' }
])
AppCmp { ... }

Now the recommended way to handle this is case is to use `useAsDefault` like so:

```
@RouteConfig([
	{ path: '/tab', component: TabsCmp, name: 'Tab' }
])
AppCmp { ... }

@RouteConfig([
	{ path: '/posts', component: PostsCmp, useAsDefault: true, name: 'Posts' },
	{ path: '/users', component: UsersCmp, name: 'Users' }
])
TabsCmp { ... }
```

In the above example, you can write just `['/Tab']` and the route `Users` is automatically selected as a child route.

Closes #4728
Closes #4228
Closes #4170
Closes #4490
Closes #4694
Closes #5200

Closes #5475
2015-11-30 17:06:03 +00:00
..
animate cleanup: move DomAdapter from angular2/core into angular2/platform/common_dom 2015-11-20 00:14:24 +00:00
common fix(forms): scope value accessors, validators, and async validators to self 2015-11-23 23:48:54 +00:00
compiler chore(parser): cleanup unused imports 2015-11-24 19:36:30 +00:00
core fix(parser): do not crash on untokenizable quote prefixes 2015-11-25 23:43:52 +00:00
facade fix(EventEmitter): resolve onError and onComplete asynchronously 2015-11-24 16:54:13 -08:00
http chore(bundles): don't distribute sfx bundles for http 2015-11-30 16:29:58 +00:00
mock fix(web worker): remove usages of deprecated zone API 2015-11-25 19:25:08 +00:00
platform cleanup(tooling): move tooling to the browser platform and rename profile into instrumentation 2015-11-24 19:29:52 +00:00
router refactor(router): improve recognition and generation pipeline 2015-11-30 17:06:03 +00:00
testing cleanup(tooling): move tooling to the browser platform and rename profile into instrumentation 2015-11-24 19:29:52 +00:00
transform/template_compiler chore(core): move compiler out of core 2015-11-05 14:44:52 -08:00
upgrade refactor(EventEmitter): rename .next() to .emit() 2015-11-18 22:16:40 +00:00
web_workers fix(web worker): remove usages of deprecated zone API 2015-11-25 19:25:08 +00:00