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

Commit

Permalink
feat(docs): Use $scope instead of scope
Browse files Browse the repository at this point in the history
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.
The fix also includes missing `}` mentioned here:

Here's a working pen: http://codepen.io/anon/pen/ZGWOpZ.

Fixes #2788. Closes #2836.
  • Loading branch information
miensol authored and ThomasBurleson committed Jun 4, 2015
1 parent 0729587 commit 9683d66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ function MdDialogDirective($$rAF, $mdTheming) {
* },
* controller: DialogController
* });
* function DialogController(scope, $mdDialog, items) {
* scope.items = items;
* scope.closeDialog = function() {
* function DialogController($scope, $mdDialog, items) {
* $scope.items = items;
* $scope.closeDialog = function() {
* $mdDialog.hide();
* }
* }
* }
*
* }
* })(angular);
* </hljs>
*
Expand Down

1 comment on commit 9683d66

@gkalpak
Copy link
Member

@gkalpak gkalpak commented on 9683d66 Jun 5, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why scope would have worked the same as $scope. Isn't it DI'ed ?

Please sign in to comment.