aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/ngClass.js
diff options
context:
space:
mode:
authorPete Bacon Darwin2013-11-14 14:00:06 +0000
committerPete Bacon Darwin2013-11-14 14:00:06 +0000
commitfd7bca22e16b0ecbe1feaf49bab39d9a44b8df01 (patch)
treebd9905b696227ceb97f2d1a4403e56182b72b779 /src/ng/directive/ngClass.js
parent8f283fe4738b607e3b82924007eeb30fad522137 (diff)
downloadangular.js-fd7bca22e16b0ecbe1feaf49bab39d9a44b8df01.tar.bz2
docs(ngClass): distinguish between CSS classes and scope properties
Closes #4914
Diffstat (limited to 'src/ng/directive/ngClass.js')
-rw-r--r--src/ng/directive/ngClass.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ng/directive/ngClass.js b/src/ng/directive/ngClass.js
index f1715765..96bd601d 100644
--- a/src/ng/directive/ngClass.js
+++ b/src/ng/directive/ngClass.js
@@ -98,18 +98,18 @@ function classDirective(name, selector) {
* @example Example that demonstrates basic bindings via ngClass directive.
<example>
<file name="index.html">
- <p ng-class="{strike: strike, bold: bold, red: red}">Map Syntax Example</p>
- <input type="checkbox" ng-model="bold"> bold
- <input type="checkbox" ng-model="strike"> strike
- <input type="checkbox" ng-model="red"> red
+ <p ng-class="{strike: deleted, bold: important, red: error}">Map Syntax Example</p>
+ <input type="checkbox" ng-model="deleted"> deleted (apply "strike" class)<br>
+ <input type="checkbox" ng-model="important"> important (apply "bold" class)<br>
+ <input type="checkbox" ng-model="error"> error (apply "red" class)
<hr>
<p ng-class="style">Using String Syntax</p>
<input type="text" ng-model="style" placeholder="Type: bold strike red">
<hr>
<p ng-class="[style1, style2, style3]">Using Array Syntax</p>
- <input ng-model="style1" placeholder="Type: bold"><br>
- <input ng-model="style2" placeholder="Type: strike"><br>
- <input ng-model="style3" placeholder="Type: red"><br>
+ <input ng-model="style1" placeholder="Type: bold, strike or red"><br>
+ <input ng-model="style2" placeholder="Type: bold, strike or red"><br>
+ <input ng-model="style3" placeholder="Type: bold, strike or red"><br>
</file>
<file name="style.css">
.strike {