Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Incorrect syntax on $mdDialog example #2788

Closed
nikkwong opened this issue May 8, 2015 · 0 comments
Closed

Incorrect syntax on $mdDialog example #2788

nikkwong opened this issue May 8, 2015 · 0 comments
Assignees
Milestone

Comments

@nikkwong
Copy link

nikkwong commented May 8, 2015

Wanted to note that the example for JavaScript: object syntax in the $mdDialog documentaiton is missing a } on the last line, it should read, }})(angular); instead of the current })(angular);.

As a side note, it would be great to get some further information on how $mdDialog returns promise objects, say if I modified models in a Dialog window, is that what $mdDialog returns via $mdDialog.hide?—I feel as the documentation is vague, even after reading the $q angular documentation.

Thanks.

@ThomasBurleson ThomasBurleson self-assigned this May 9, 2015
@ThomasBurleson ThomasBurleson added this to the 0.10.0 milestone May 9, 2015
miensol added a commit to miensol/material that referenced this issue May 13, 2015
To avoid confusion I guess it would be good to keep the examples consistent.
While `scope` in `DialogController` will be the same as `$scope` it brings confusion to the reader.
I can only guess that `scope` here working is only by accident - caused by https://github.com/angular/material/blob/786b0ed3652b7460c2c802efa1aa79972bd96f5d/src/core/services/interimElement/interimElement.js#L353.

The fix also includes missing `}` mentioned here:   angular#2788

Here's a working pen: http://codepen.io/anon/pen/ZGWOpZ.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants