It should be a straightforward task, but for some reason, it just won't cooperate.
Within my controller:
$scope.projects = [ //...
{ background: "#ffffcc" },
//...
];
In the HTML:
<div ng-repeat="project in projects"
ng-style="{'backgroundColor': project.background}">
</div>
Replacing project.background
with '#ffffcc'
does the trick. I've also attempted using background-color
without success. Even trying {{project.background}}
hasn't worked as expected.