Syntax for ng-class in SVG

Hi everyone,

I’ve been working on my new HabPanel thermostat widget. So far so good, as you can see below:

The values are being read out correctly and the buttons change the thermostat setpoint as expected. Now I want two icons to show the battery and window state at the top of the thermostat display. But for some unknown reason I can’t get the right syntax for my hide ng-class. I have the following so far:

<g id="windowOpen" transform="matrix(.45089 0 0 .45089 63.614 -30.407)" ng-class="{'hide':itemState(config.windowState) == 'closed'}">

The windowOpen icon should disappear when the window is closed. But it doesn’t

The image is an SVG added directly into the widget code.

My hide style in my CSS does work, as I tested it by adding class=“hide” directly in the <g element. The state of the window contact changes as expected, as I checked it in my model.

Where am I going wrong? It’s probably something totally obvious, like the syntax.

Thanks for any help

Rob