angular/modules/angular2/src/router
Brian Ford cf7292fcb1 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 #4170
Closes #4490
Closes #4694
Closes #5200

Closes #5352
2015-11-20 23:18:43 +00:00
..
async_route_handler.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
component_recognizer.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
hash_location_strategy.ts cleanup: move DomAdapter from angular2/core into angular2/platform/common_dom 2015-11-20 00:14:24 +00:00
instruction.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
interfaces.ts refactor(core): move facades out of core 2015-11-07 01:36:06 +00:00
lifecycle_annotations.dart feat(router): lifecycle hooks 2015-07-13 09:12:15 -07:00
lifecycle_annotations.ts refactor(core): move facades out of core 2015-11-07 01:36:06 +00:00
lifecycle_annotations_impl.ts refactor(core): move facades out of core 2015-11-07 01:36:06 +00:00
location.ts refactor(EventEmitter): rename .next() to .emit() 2015-11-18 22:16:40 +00:00
location_strategy.ts fix(router): apply APP_BASE_HREF when using PathLocationStrategy 2015-11-17 21:19:22 +00:00
package.json chore(): npm release script for router artifacts. 2015-11-09 20:45:55 +00:00
path_location_strategy.ts cleanup: move DomAdapter from angular2/core into angular2/platform/common_dom 2015-11-20 00:14:24 +00:00
path_recognizer.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
route_config_decorator.dart refactor(router): convert to typescript 2015-06-02 11:06:44 -07:00
route_config_decorator.ts chore(ts2dart): replace List with Array 2015-08-31 21:32:10 +00:00
route_config_impl.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
route_config_nomalizer.dart refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
route_config_nomalizer.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
route_definition.dart refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
route_definition.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
route_handler.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
route_lifecycle_reflector.dart chore: update all import paths 2015-08-25 15:33:23 -07:00
route_lifecycle_reflector.ts refactor(core): move facades out of core 2015-11-07 01:36:06 +00:00
route_recognizer.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
route_registry.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
router.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
router_link.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
router_outlet.ts refactor(core): move facades out of core 2015-11-07 01:36:06 +00:00
sync_route_handler.ts refactor(router): improve recognition and generation pipeline 2015-11-20 23:18:43 +00:00
url_parser.ts refactor(core): move facades out of core 2015-11-07 01:36:06 +00:00