1
0
-1

Hi,


I have a simple expression in my Maestro form to personalize a Text Display:

{{(data.checkbox !== true)? 'Not Displaying Msg1' : 'Make Bold  ' + data.msg1 }}

This works fine as is; however, if I add any Rich Text features to the string 'Make Bold' the expression does not work:

{{(data.checkbox !== true)? 'Not Displaying Msg1' : 'Make Bold  ' + data.msg1 }}

I suspect that it is because behind the scenes, in the Rich Text editor, we are adding the <strong> tags; however, I was wondering if there was a way to do this without having to write code?

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      As well as Angular expressions, you can use Angular directives. So you could do this:

      <div ng-style="{'font-weight': data.checkbox ? 'bold' : 'normal'}">
      {{!data.checkbox ? 'Not displaying Msg1' : 'Make Bold' + data.msg1}}
      </div>

      Or this:

      <span ng-if="data.checkbox">Not displaying Msg1</span>
      <b ng-if="!data.checkbox">Make bold {{data.msg1}}</b>

      Or you could use a custom class rule on the text display.

      1. Gary Thain

        Perfect and thank you

      CommentAdd your comment...