Go to file
Kara 9d265b6f61 feat(forms): add modules for forms and deprecatedForms (#9859)
Closes #9732

BREAKING CHANGE:

We have removed the deprecated form directives from the built-in platform directive list, so apps are not required to package forms with their app. This also makes forms friendly to offline compilation.

Instead, we have exposed three modules:

OLD API:
- `DeprecatedFormsModule`

NEW API:
- `FormsModule`
- `ReactiveFormsModule`

If you provide one of these modules, the default forms directives and providers from that module will be available to you app-wide.  Note: You can provide both the `FormsModule` and the `ReactiveFormsModule` together if you like, but they are fully-functional separately.

**Before:**
```ts
import {disableDeprecatedForms, provideForms} from @angular/forms;

bootstrap(App, [
   disableDeprecatedForms(),
   provideForms()
]);
```

**After:**

```ts
import {DeprecatedFormsModule} from @angular/common;

bootstrap(App, {modules: [DeprecatedFormsModule] });
```

-OR-

```ts
import {FormsModule} from @angular/forms;

bootstrap(App, {modules: [FormsModule] });
```

-OR-

```ts
import {ReactiveFormsModule} from @angular/forms;

bootstrap(App, {modules: [ReactiveFormsModule] });
```

You can also choose not to provide any forms module and run your app without forms.

Or you can choose not to provide any forms module *and* provide form directives at will.  This will allow you to use the deprecatedForms API for some components and not others.

```
import {FORM_DIRECTIVES, FORM_PROVIDERS} from @angular/forms;

@Component({
   selector: some-comp,
   directives: [FORM_DIRECTIVES],
   providers: [FORM_PROVIDERS]
})
class SomeComp
```
2016-07-07 11:32:51 -07:00
.github chore(.github): improve github issue and PR templates 2016-06-16 14:29:05 -07:00
modules feat(forms): add modules for forms and deprecatedForms (#9859) 2016-07-07 11:32:51 -07:00
modules_dart Revert "feat(change_detection): make INTERPOLATE_REGEXP customizable (#7417)" 2016-06-01 17:53:45 -07:00
scripts chore: enable cyclic dependency check 2016-06-30 14:28:22 -07:00
tools feat(forms): add modules for forms and deprecatedForms (#9859) 2016-07-07 11:32:51 -07:00
.bowerrc chore(dgeni): clean up legacy typings bundle creation 2015-10-29 21:19:59 +00:00
.clang-format
.editorconfig
.gitattributes build: fix some issues on Windows platforms 2016-06-23 10:46:01 +02:00
.gitignore chore(tsc-wrapped): update to newest tsickle 2016-06-09 16:45:16 -07:00
.nvmrc build(node): upgrade to node 5.4.1 2016-01-22 03:25:34 +00:00
.travis.yml chore(build): activate optional jobs in SL and BS (#8605) 2016-06-09 15:21:17 -07:00
CHANGELOG.md doc(changelog): cleans up markdown for breaking changes (#9739) 2016-06-30 17:31:39 -07:00
COMMITTER.md chore(docs): update the merge process docs 2015-12-23 02:32:02 +00:00
CONTRIBUTING.md removes tailing slashes from url in lines 229 231 2016-05-26 09:58:14 -07:00
DEVELOPER.md chore(docs): Fixed pre-commit command for clang-format 2016-06-13 12:12:44 -07:00
LICENSE Update change from Apache to MIT license 2016-01-08 13:41:58 -08:00
NAMING.md refactor(ngProbe): rename to ng.probe 2015-08-31 21:32:10 +00:00
README.md chore(readme): add CircleCI status badge 2016-05-27 11:40:30 -07:00
TOOLS.md feat(docs): document change detection profiler 2015-09-04 16:38:53 -07:00
TOOLS_DART.md fix(docs): fix an import in TOOLS_DART.md 2015-12-17 23:30:44 +00:00
TOOLS_JS.md doc: fix `enableDebugTools` import path (#9377) 2016-06-20 16:45:35 -07:00
TRIAGE_AND_LABELS.md chore(docs): explain the process for merging changes to master 2015-08-11 21:28:46 +00:00
bower.json fix(benchmarks): update react and polymer benchmarks and get tree update numbers for all of the benchmarks as well. 2015-10-28 13:17:01 -07:00
browser-providers.conf.js chore(build): reenable optional jobs in SL and BS 2016-05-11 17:00:43 -07:00
build.sh chore(build): update build script to increase node's heap size 2016-07-06 14:38:05 -07:00
circle.yml chore(lint): re-enable clang-format on tools/ 2016-05-26 15:46:03 -07:00
gulpfile.js build(gulp): Fix paths for public-api tasks on Windows (#9794) 2016-07-05 20:52:35 -07:00
gulpfile.js.old build: use connect web server instead of SimpleHTTPServer 2016-05-25 08:22:07 -07:00
karma-js.conf.js chore(karma): remove ref to legacy files (#9008) 2016-06-04 14:44:59 -07:00
npm-shrinkwrap.clean.json build(npm): upgrade ts-api-guardian to v0.1.4 2016-06-27 12:27:59 -07:00
npm-shrinkwrap.json build(npm): upgrade ts-api-guardian to v0.1.4 2016-06-27 12:27:59 -07:00
npm-shrinkwrap.readme.md build(npm): add tools/npm/reshrinkwrap script and update docs 2016-01-22 03:25:33 +00:00
package.json docs(changelog): change log and package.json to rc4 2016-06-30 10:16:32 -07:00
perf-cloud-secret.template.js
presubmit.sh refactor(compiler): rename /compiler_cli to /compiler-cli 2016-06-02 13:50:32 -07:00
protractor-dart2js.conf.js chore: rename modules/examples to modules/playground 2015-10-18 11:48:43 +00:00
protractor-ddc.conf.js chore(ddc): add e2e test infra + first test 2016-03-22 22:09:33 +00:00
protractor-js-dev.conf.js
protractor-js-new-world.conf.js build: use connect web server instead of SimpleHTTPServer 2016-05-25 08:22:07 -07:00
protractor-js-prod.conf.js chore(build): add a task to watch and render examples and e2e tests for production 2015-06-19 18:57:41 -04:00
protractor-js.conf.js build: adding basic e2e testing infrastructure 2016-05-02 08:15:10 -07:00
protractor-shared.js refactor(chore): Replace all 'bindings' with 'providers' 2016-05-23 13:31:08 -07:00
publish-packages.sh cleanup(router): removes router 2016-06-20 08:47:54 -07:00
pubspec.yaml chore(test): migrate Dart tests to package:test 2016-03-04 02:27:44 +00:00
shims_for_IE.js fix(IE): make shim work with instrumented code 2016-05-19 20:50:01 -07:00
test-main.js feat(testing): add implicit test module 2016-07-06 18:04:19 -07:00
test.sh chore: have test.sh take platform argument 2016-06-14 13:07:11 -07:00
tslint.json chore(lint): Add lint check for license headers 2016-06-23 09:46:32 -07:00

README.md

Build Status CircleCI Join the chat at https://gitter.im/angular/angular Issue Stats Issue Stats npm version Downloads

Sauce Test Status

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 Release Candidate.

Quickstart

Get started in 5 minutes.

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.