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
This commit is contained in:
Pete Bacon Darwin 2013-11-13 21:44:28 +00:00
parent afbed10feb
commit bcdbfdfeae

View file

@ -118,9 +118,9 @@ inheritance, and child scopes prototypically inherit from their parents.
This example illustrates scopes in application, and prototypical inheritance of properties. The example is followed by
a diagram depicting the scope boundaries.
<div class="show-scope">
<example>
<file name="index.html">
<div class="show-scope-demo">
<div ng-controller="GreetCtrl">
Hello {{name}}!
</div>
@ -129,6 +129,7 @@ a diagram depicting the scope boundaries.
<li ng-repeat="name in names">{{name}}</li>
</ol>
</div>
</div>
</file>
<file name="script.js">
function GreetCtrl($scope) {
@ -140,14 +141,13 @@ a diagram depicting the scope boundaries.
}
</file>
<file name="style.css">
.show-scope .doc-example-live.ng-scope,
.show-scope .doc-example-live .ng-scope {
.show-scope-demo.ng-scope,
.show-scope-demo .ng-scope {
border: 1px solid red;
margin: 3px;
}
</file>
</example>
</div>
<img class="center" src="img/guide/concepts-scope.png">