The reason that doesn't work is because it acts just like a Javascript object so you can't do this in javascript can you
var test = 'hello';
var object = {
test: 'hi'
};
object[test] === undefined // true // or
object.hello === undefined // true
object.test === undefined // false
So you can't create a key
with a variable like that. so try something like this.
ng-class="{ true: thing.a, false: '' }[thing.aTrue]"
Demo: http://jsfiddle.net/XzXzR/1/
what this does is this (explanation in javascript)
var test = {
one: 'hello',
two: 'world'
}['one'];
What does test equal?
test === Object {one: "hello", two: "world"} // false
test === Object {one: "hello"} // false
test === Object {two: "world"} // false
test === 'one' // false
test === 'two' // false
test === 'hello' // ** true **
test === 'world' // false