angular-docs-cn/tools
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
..
analytics chore(analytics): Build hello_world, check constraints 2015-11-23 20:10:04 +00:00
broccoli refactor(router): improve recognition and generation pipeline 2015-11-30 17:06:03 +00:00
build chore(analytics): Build hello_world, check constraints 2015-11-23 20:10:04 +00:00
cjs-jasmine chore(tests): Enable dev mode in all Angular tests. 2015-11-06 07:07:04 +00:00
code.angularjs.org chore(gulp): moves bundles to dist/js/bundles 2015-07-27 16:12:24 -07:00
karma fix(build): fix source maps 2015-11-24 19:33:27 +00:00
npm build(npm): don't rely on fs-extra when purging node_modules 2015-07-01 09:19:03 -07:00
travis build(travis): add travis log folding for verbose tasks 2015-10-03 21:33:57 +00:00
tslint fix(lint): enforce that module-private members have @internal. 2015-10-28 22:14:48 +00:00
check-environment.js build: make 'npm install' work reliably and issue build warning when node_modules look stale 2015-06-08 13:05:04 -07:00
chromedriverpatch.js chore(testing): update protractor to version 2.1.0 2015-05-20 17:28:23 -07:00
jsconfig.json chore(vscode): add jsconfig.json and remove .settings dir 2015-10-29 13:53:21 +00:00
tsconfig.json chore(typescript 1.6 upgrade): fix build.tools 2015-09-25 20:15:55 +00:00
tsd.json chore(typescript 1.6 upgrade): fix build.tools 2015-09-25 20:15:55 +00:00
utils.inc feat(bundle): add script to push bundles to code.angularjs.org 2015-04-14 14:50:53 -07:00