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

Commit bcdbfdf

Browse files
docs(guide/scope): ensure demo CSS styles work in JSFiddle and Plunker
The CSS styling in the ng-scope demo was using CSS classes (`.doc-example-live` and `.show-scope') to prevent the styling for the demo from affecting the entire page. Unfortunately elements containing these classes did not appear in JSFiddle or Plunker when you click edit. This fix moves the `.show-scope' class inside the demo (renaming it `.show-scope-demo`) and removes the reliance on `.doc-example-live` altogether. Closes #4838
1 parent afbed10 commit bcdbfdf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/content/guide/scope.ngdoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ inheritance, and child scopes prototypically inherit from their parents.
118118
This example illustrates scopes in application, and prototypical inheritance of properties. The example is followed by
119119
a diagram depicting the scope boundaries.
120120

121-
<div class="show-scope">
122121
<example>
123122
<file name="index.html">
123+
<div class="show-scope-demo">
124124
<div ng-controller="GreetCtrl">
125125
Hello {{name}}!
126126
</div>
@@ -129,6 +129,7 @@ a diagram depicting the scope boundaries.
129129
<li ng-repeat="name in names">{{name}}</li>
130130
</ol>
131131
</div>
132+
</div>
132133
</file>
133134
<file name="script.js">
134135
function GreetCtrl($scope) {
@@ -140,14 +141,13 @@ a diagram depicting the scope boundaries.
140141
}
141142
</file>
142143
<file name="style.css">
143-
.show-scope .doc-example-live.ng-scope,
144-
.show-scope .doc-example-live .ng-scope {
144+
.show-scope-demo.ng-scope,
145+
.show-scope-demo .ng-scope {
145146
border: 1px solid red;
146147
margin: 3px;
147148
}
148149
</file>
149150
</example>
150-
</div>
151151

152152
<img class="center" src="img/guide/concepts-scope.png">
153153

0 commit comments

Comments
 (0)