Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,37 @@ directives: [MD_CARD_DIRECTIVES, MD_BUTTON_DIRECTIVES]
- [Puppy Love Mobile (Google IO 2016)](https://github.com/kara/puppy-love-io)
- [Material 2 Sample App](https://github.com/jelbourn/material2-app)

### Additional steps for using Material components with forms

If you're using Angular Material 2 version alpha.6 or later, you'll need to upgrade to Angular 2's
new forms module. Here's how:

- Install the `@angular/forms` package. If you're on Angular RC.4, install version 0.2.0.

```bash
npm install @angular/forms
```

- Change your bootstrap file to disable the old form directives and provide the new form
directives.

**main.ts**
```ts
import {disableDeprecatedForms, provideForms} from '@angular/forms';

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

- Import any and all forms symbols - `NgForm`, `Validators`, etc - from `@angular/forms`.
Importing them from `@angular/common` will result in a `No value accessor found` error.

- Update your form code to use the new APIs. See more information about the changes in the proposal
doc [here](https://docs.google.com/document/u/1/d/1RIezQqE4aEhBRmArIAS1mRIZtWFf6JxN_7B4meyWK0Y/pub)
and the official documentation [here](https://angular.io/docs/ts/latest/guide/forms.html).

### Additional steps for `md-icon` setup:

- If you want to use Material Design icons, load the Material Design font in your `index.html`. `md-icon` supports any font icons or svg icons,
Expand Down