[SOLVED] Group Count not working

Just starting to work with OpenHab and have not been able to get the group count to control the background color. Any thoughts?

<div 
     ng-style="{
      'background-color': {{(itemsInGroup(config.ITEM_ID) | filter:{type:'Switch', state:'1'}).length + (itemsInGroup(config.ITEM_ID) | filter:{type:'Dimmer', state:'!0'}:true).length}} =='0' ? config.OPEN_COLOR : config.CLOSED_COLOR
     }"
     class="template-container"
     style="top:0;bottom:0;left:0;right:0;position:absolute">
   <div class="template-contents">

  <div class="row">
    <div class="ng-binding">{{(config.ITEM_NAME)}}</div>
  </div>
	<div class="row" >
    	<widget-icon iconset="(config.ICONSET)" icon="(config.ICON)"
     		size="(config.icon_size)" center="true"  />
  </div>
		<div class="row">
 			<div class="">({{(itemsInGroup(config.ITEM_ID) | filter:{type:'Switch', state:'1'}).length + (itemsInGroup(config.ITEM_ID) | filter:{type:'Dimmer', state:'!0'}:true).length}})</div>
		</div>
  </div>
</div>

filter:{type:'Switch', state:'1'}

Not sure, but I think the Switch items’ states here would be ‘ON’ rather than ‘1’.

I had been testing with only dimmers. You are correct it needs to be ‘ON’.
The group counting displays correctly in the bottom row.
But using the same syntax for the background-color doesn’t trigger any changes.
I have done this same thing looking at an items value and it works fine.
Im sure this is a syntax deal just not sure what it might be at this point.

Ah, right. You don’t need any {{ }} to evaluate the expression because the whole ng-style is already an expression.
Try:

ng-style="{ 'background-color': (itemsInGroup(config.ITEM_ID) | filter:{type:'Switch', state:'1'}).length + (itemsInGroup(config.ITEM_ID) | filter:{type:'Dimmer', state:'!0'}:true).length =='0' ? config.OPEN_COLOR : config.CLOSED_COLOR }"

Awesome! That was it thanks a bunch.