1. Why it does not work ?
The reason why this code ng-class="panel-{{panel.color}}" doesn't work is that you are confusing ng-class directive which accepts variables names without doubles curly braces and class attribute which requires doubles curly braces around the variables names.
2. How to fix it ?
There are two ways to do it :
One way with ng-class :
<span ng-class="'panel-'+panel.color">panel {{panel.color}}</span>
Another one with class :
<span class="panel-{{panel.color}}">panel {{panel.color}}</span>
3. ngClass directive is very handy
There are many ways to use ngClass.
You can pass an array of class names :
<span ng-class="['panel-'+panel.color, 'panel-'+panel.primary]">panel </span>
Or you can conditionally add classes :
<span ng-class="{'panel-red' : panel.isRed, 'panel-primary': panel.isPrimary}">panel</span>
Or use ternary operator :
<span ng-class="panel.isRed ? 'panel-red' : 'panel-not-red'">panel</span>
ng-classcorrectly, should read about ngClass API here: docs.angularjs.org/api/ng/directive/ngClass. Otherwise useng-attr-class.ng-classis useful if you want to add and remove classes dynamically, but if you just want to interpolate a variable useclass.