angular/modules/angular2
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(testing): create top level files for mocks 2015-11-24 19:29:52 +00:00
docs refactor(EventEmitter): rename .next() to .emit() 2015-11-18 22:16:40 +00:00
examples docs(pipes): Add examples for all Angular pipes. 2015-11-17 00:15:17 +00:00
http cleanup(testing): create top level files for mocks 2015-11-24 19:29:52 +00:00
manual_typings build: add --projects a.k.a the turbo button 2015-11-13 22:50:38 +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 cleanup(testing): create top level files for mocks 2015-11-24 19:29:52 +00:00
src refactor(router): improve recognition and generation pipeline 2015-11-30 17:06:03 +00:00
test refactor(router): improve recognition and generation pipeline 2015-11-30 17:06:03 +00:00
web_worker cleanup(tooling): move tooling to the browser platform and rename profile into instrumentation 2015-11-24 19:29:52 +00:00
angular2.dart cleanup(testing): create top level files for mocks 2015-11-24 19:29:52 +00:00
angular2.ts cleanup(tooling): move tooling to the browser platform and rename profile into instrumentation 2015-11-24 19:29:52 +00:00
angular2_sfx.dart style(dart): Format Dart source with dart_style 0.1.8 2015-05-29 10:42:47 -07:00
angular2_sfx.ts fix(core): Fix typo 2015-10-26 17:52:42 +00:00
animate.ts feat(animate): adds basic support for CSS animations on enter and leave 2015-09-14 17:37:09 +00:00
bootstrap.ts feat(core): extract platforms out of core 2015-11-13 19:26:14 +00:00
bootstrap_static.ts feat(core): extract platforms out of core 2015-11-13 19:26:14 +00:00
common.ts refactor(core): move directives, pipes, and forms into common 2015-11-05 23:00:32 +00:00
compiler.ts refactor(core): move render/dom from core 2015-11-17 15:53:55 -08:00
core.ts cleanup: move DomAdapter from angular2/core into angular2/platform/common_dom 2015-11-20 00:14:24 +00:00
http.ts cleanup(tooling): move tooling to the browser platform and rename profile into instrumentation 2015-11-24 19:29:52 +00:00
instrumentation.ts cleanup(tooling): move tooling to the browser platform and rename profile into instrumentation 2015-11-24 19:29:52 +00:00
package.json chore(package.json): remove typings bundles 2015-10-15 16:17:17 -07:00
pubspec.yaml refactor(compiler): make all commands const 2015-11-09 10:59:08 -08:00
README.dart.md feat(publish): update files to publish to npm 2015-02-24 16:53:44 -08:00
README.js.md chore(build): remove es5build.js 2015-11-06 18:22:57 +00:00
router.ts refactor(router): improve recognition and generation pipeline 2015-11-30 17:06:03 +00:00
test.ts refactor(test): rename test_lib to testing 2015-10-13 10:36:49 -07:00
test_lib.ts refactor(test): rename test_lib to testing 2015-10-13 10:36:49 -07:00
testing.ts cleanup(testing): create top level files for mocks 2015-11-24 19:29:52 +00:00
testing_internal.ts refactor(test): rename test_lib to testing 2015-10-13 10:36:49 -07:00
tsconfig.json fix(setup): set tsconfig so that it works in editors 2015-11-09 08:43:15 -08:00
tsd.json refactor(NgZone): improve types 2015-10-09 23:54:31 +00:00
upgrade.ts chore(ngUpgrade): Move into Angular2 2015-10-31 20:48:27 -07:00

Angular2

The sources for this package are in the main Angular2 repo. Please file issues and pull requests against that repo. This is the repository for the upcoming 2.0 version. If you're looking for the current official version of Angular you should go to angular/angular.js

This package contains different sources for different users:

  1. The files located in the root folder can be consumed using CommonJS.
  2. The files under /es6 are es6 compatible files that can be transpiled to es5 using any transpiler. This contains:
    • dev/: a development version that includes runtime type assertions
    • prod/: a production version that does not include runtime type assertions
  3. The files under /ts are the TypeScript source files.

License: Apache MIT 2.0