Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add radio button provider to documentation #834

Closed
kara opened this issue Jul 8, 2016 · 6 comments
Closed

Add radio button provider to documentation #834

kara opened this issue Jul 8, 2016 · 6 comments
Labels
docs This issue is related to documentation help wanted The team would appreciate a PR from the community to address this issue

Comments

@kara
Copy link
Contributor

kara commented Jul 8, 2016

https://github.com/angular/material2/tree/master/src/components/radio

README doesn't mention that you need MdUniqueSelection Dispatcher.

@kara kara added docs This issue is related to documentation effort1: easy (hours) help wanted The team would appreciate a PR from the community to address this issue labels Jul 8, 2016
@pgurenko
Copy link
Contributor

I would like to fix this to get familiar with the contribution process but have not found the similar examples in the docs or guide on where to put such dependency information.
My best guess is in the "Notes":

  • Requires MdUniqueSelectionDispatcher as a provider from @angular2-material/core.
    What do you think?

@kara
Copy link
Contributor Author

kara commented Jul 10, 2016

@pgurenko Thanks for taking this on! I think the best place would actually be on top, before the examples (to make sure it's seen). Add a section for "Setup" and show how you'd import the symbols, add the provider to providers, and add the directives to directives.

@pgurenko
Copy link
Contributor

Something like that?

Setup

Importing the symbols:

import { MdUniqueSelectionDispatcher } from '@angular2-material/core';
import { MD_RADIO_DIRECTIVES } from '@angular2-material/radio';

Adding providers and directives:

@Component({
  directives: [MD_RADIO_DIRECTIVES],
  providers: [MdUniqueSelectionDispatcher]
})

@kara
Copy link
Contributor Author

kara commented Jul 10, 2016

Yeah, that looks great. Only nitpick would be to add ellipses so it's clear the selector, template, etc are missing.

@Component({
  ...
  directives: [MD_RADIO_DIRECTIVES],
  providers: [MdUniqueSelectionDispatcher]
})

pgurenko added a commit to pgurenko/material2 that referenced this issue Jul 10, 2016

Verified

This commit was signed with the committer’s verified signature.
shuding Shu Ding
fix for "Add radio button provider to documentation angular#834".
Current docs did not have the mention that radio component requires MdUniqueSelectionDispatcher provider
@kara kara closed this as completed in 8474119 Jul 10, 2016
@zlepper
Copy link

zlepper commented Sep 19, 2016

How is this working with the new module system?
Shouldn't the MdRadioModule be self contained enough that you can add it to your imports and everything should work?

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs This issue is related to documentation help wanted The team would appreciate a PR from the community to address this issue
Projects
None yet
Development

No branches or pull requests

3 participants