diff --git a/src/ng/directive/ngClass.js b/src/ng/directive/ngClass.js index dd06bd0c4635..b165995032f7 100644 --- a/src/ng/directive/ngClass.js +++ b/src/ng/directive/ngClass.js @@ -162,7 +162,7 @@ function classDirective(name, selector) { * @example Example that demonstrates basic bindings via ngClass directive. -

Map Syntax Example

+

Map Syntax Example



Using String Syntax

@@ -202,6 +202,10 @@ function classDirective(name, selector) { .red { color: red; } + .has-error { + color: red; + background-color: yellow; + } .orange { color: orange; } @@ -212,13 +216,13 @@ function classDirective(name, selector) { it('should let you toggle the class', function() { expect(ps.first().getAttribute('class')).not.toMatch(/bold/); - expect(ps.first().getAttribute('class')).not.toMatch(/red/); + expect(ps.first().getAttribute('class')).not.toMatch(/has-error/); element(by.model('important')).click(); expect(ps.first().getAttribute('class')).toMatch(/bold/); element(by.model('error')).click(); - expect(ps.first().getAttribute('class')).toMatch(/red/); + expect(ps.first().getAttribute('class')).toMatch(/has-error/); }); it('should let you toggle string example', function() {