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

Commit dc3b028

Browse files
Splaktarmmalerba
authored andcommitted
docs(panel): fix ampersands getting parsed into & (#11450)
<!-- Filling out this template is required! Do not delete it when submitting a Pull Request! Without this information, your Pull Request may be auto-closed. --> ## PR Checklist Please check that your PR fulfills the following requirements: - [x] The commit message follows [our guidelines](https://github.com/angular/material/blob/master/.github/CONTRIBUTING.md#-commit-message-format) - [x] Tests for the changes have been added or this is not a bug fix / enhancement - [x] Docs have been added, updated, or were not required ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [ ] Bugfix [ ] Enhancement [x] Documentation content changes [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Build related changes [ ] CI related changes [ ] Infrastructure changes [ ] Other... Please describe: ``` ## What is the current behavior? Some of the code in the example was getting parsed to `&amp;&amp;`. <!-- Please describe the current behavior that you are modifying and link to one or more relevant issues. --> Issue Number: N/A ## What is the new behavior? Fixed to not use `&&` in this example. ## Does this PR introduce a breaking change? ``` [ ] Yes [x] No ``` <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> <!-- Note that breaking changes are highly unlikely to get merged to master unless the validation is clear and the use case is critical. --> ## Other information
1 parent 1294a26 commit dc3b028

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/panel/panel.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,11 @@ angular
111111
* }
112112
*
113113
* function PanelMenuCtrl(mdPanelRef) {
114-
* // The controller is provided with an import named 'mdPanelRef'
114+
* // 'mdPanelRef' is injected in the controller.
115115
* this.closeMenu = function() {
116-
* mdPanelRef && mdPanelRef.close();
116+
* if (mdPanelRef) {
117+
* mdPanelRef.close();
118+
* }
117119
* };
118120
* }
119121
* })(angular);

0 commit comments

Comments
 (0)