mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Deliver web apps with confidence 🚀
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
|
||
|---|---|---|
| modules | ||
| modules_dart | ||
| scripts | ||
| tools | ||
| typing_spec | ||
| .bowerrc | ||
| .clang-format | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .nvmrc | ||
| .travis.yml | ||
| bower.json | ||
| browser-providers.conf.js | ||
| CHANGELOG.md | ||
| COMMITTER.md | ||
| CONTRIBUTING.md | ||
| DEVELOPER.md | ||
| gulpfile.js | ||
| karma-dart-evalcache.js | ||
| karma-dart.conf.js | ||
| karma-js.conf.js | ||
| LICENSE | ||
| NAMING.md | ||
| npm-shrinkwrap.clean.json | ||
| npm-shrinkwrap.json | ||
| npm-shrinkwrap.readme.md | ||
| package.json | ||
| perf-cloud-secret.template.js | ||
| protractor-dart2js.conf.js | ||
| protractor-js-dev.conf.js | ||
| protractor-js-prod.conf.js | ||
| protractor-js.conf.js | ||
| protractor-shared.js | ||
| pubspec.yaml | ||
| README.md | ||
| test-init.dart | ||
| test-main.dart | ||
| test-main.js | ||
| TOOLS.md | ||
| TOOLS_DART.md | ||
| TOOLS_JS.md | ||
| TRIAGE_AND_LABELS.md | ||
| tsconfig.json | ||
Angular
Angular is a development platform for building mobile and desktop web applications. This is the repository for Angular 2, both the JavaScript (JS) and Dart versions.
Angular 2 is currently in Developer Preview. We recommend using Angular 1.X for production applications:
Quickstart
Setup & Install Angular 2
Follow the instructions given on the Angular download page.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.