From f2e3f3d30ceb45586440b4a5fb6b8dcff0ad17b0 Mon Sep 17 00:00:00 2001 From: Pavel Gurenko Date: Sun, 10 Jul 2016 16:12:27 -0700 Subject: [PATCH] docs(radio): add setup section fix for "Add radio button provider to documentation #834". Current docs did not have the mention that radio component requires MdUniqueSelectionDispatcher provider --- src/components/radio/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/components/radio/README.md b/src/components/radio/README.md index 7c30a1f812ac..87531897d09f 100644 --- a/src/components/radio/README.md +++ b/src/components/radio/README.md @@ -3,6 +3,22 @@ Radio buttons allow the user to select one option from a set. Use radio buttons ![Preview](https://material.angularjs.org/material2_assets/radio/radios.png) +### Setup +Importing the symbols: +```typescript +import { MdUniqueSelectionDispatcher } from '@angular2-material/core'; +import { MD_RADIO_DIRECTIVES } from '@angular2-material/radio'; +``` + +Adding providers and directives: +```typescript +@Component({ + ... + directives: [MD_RADIO_DIRECTIVES], + providers: [MdUniqueSelectionDispatcher] +}) +``` + ### Examples A basic radio group would have the following markup. ```html