caprez95
(Carlo Caprez)
January 17, 2020, 12:08pm
1
Dear Community
I want to create my own widget with an ng-if query.
For this I want to compare two items defined in the settings (“action_item” and “action_command”).
However the following part of the program does not work:
<div ng-if="itemValue(config.action_item)=='{{config.action_command}}'">
What am I doing wrong?
Kind regards
Caprez95
HaKuNa
(Remo M)
January 17, 2020, 12:47pm
2
I’m using it that way, but I do not comare two items, only one item against a fixed value.
Item is “Husqvarna_Connected”
<div class="row" ng-if="itemValue('Husqvarna_Connected')=='true'">
probably this works
<div class="row" ng-if="itemValue('action_item')==itemValue('action_command')">
caprez95
(Carlo Caprez)
January 17, 2020, 1:00pm
3
I figured it out!
Thats how it works:
<div ng-if="itemValue(config.action_item)==config.action_command">
@HaKuNa Thanks you for your help!
Kind regards
Carlo Caprez