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

Unclear docs example for Dialog component #2934

Closed
jamzi opened this issue Feb 4, 2017 · 4 comments
Closed

Unclear docs example for Dialog component #2934

jamzi opened this issue Feb 4, 2017 · 4 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

@jamzi
Copy link

jamzi commented Feb 4, 2017

Dialog with a result example in the docs is a little bit unclear in my opinion on how to return the value back to DialogResultExample component. If you open the plunker version, you can nicely see two .html files where it shows you that on close method you pass in the parameter. But in the docs version, there is only html for DialogResultExample component.

I am suggesting that the html tab for docs on this example would be like this:

//dialog-result-example.html
<button md-button (click)="openDialog()">Launch dialog</button>
You chose: {{selectedOption}}

//dialog-result-example-dialog.html
<h1 md-dialog-title>Dialog</h1>
<div md-dialog-content>What would you like to do?</div>
<div md-dialog-actions>
  <button md-button (click)="dialogRef.close('Option 1')">Option 1</button>
  <button md-button (click)="dialogRef.close('Option 2')">Option 2</button>
</div>

P.S. also, the title of example is Dailog with a result (notice the typo for Dialog).

Btw, you are doing an amazing work on Angular Material!

@kara kara added docs This issue is related to documentation help wanted The team would appreciate a PR from the community to address this issue labels Feb 7, 2017
@M-a-c
Copy link
Contributor

M-a-c commented Apr 3, 2017

@kara The code to fix this is probably outside of the scope of what the 'Git' touches.
You might want to reconsider if it is 'good for community contribution' or point to the source for more clarification.

@devversion You seem to do the tooling, I think these issues are related. I would love to help but really cannot find the code that generates these issues. Not sure if this is you or @crisbeto

See :
https://github.com/angular/material2/blob/f526c9de8725496b04743a326c47f6fcc35b54e2/src/examples/example-module.ts#L111
https://github.com/angular/material2/blob/master/src/examples/example-data.ts#L27
The files are supposed to be injected into the md-tab-group inside the docs-example-viewer-source but they're not ¯\(ツ)/¯.
Would gladly try and fix this if I could find out where exactly the tabs for examples are generated
https://material.angular.io/components/component/dialog --> examples --> (view source)
Notice: html ts css but no additional html file.

These issues are related to #3002 but that is also missing additional files list in its definition in example-module.ts

@jelbourn
Copy link
Member

jelbourn commented Jun 7, 2017

Tracking via angular/material.angular.io#165

@jelbourn jelbourn closed this as completed Jun 7, 2017
@coocoorhin
Copy link

great job! i have been working on the issue for a very long time when i was following the doc. your solution magically made it work!!! thanks

@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

5 participants