title: How to set a condition before assigning value to a property in html and angular?
body: <pre><code>&lt;div #dataContainer class="infills richtextbox {{field.groupid}}"
                      contentEditable="true" 
                      *ngIf="field.fieldtype=='text'"
                      id="{{field.id}}" 
                      name="{{field.id}}" 
                      [ngStyle]="{'position':'absolute','top':field.y+'px','left':field.x+'px','font-size': field.fontsize,'font-family':field.fontfamily,'width':field.width+'px','height':field.height+'px','border':'1px solid #FFF','background':'#EEE','overflow':'hidden' }"
                      title="{{field.description}}"
                      [(ngModel)]="field.value" 
                      (keypress)="_keyPress($event,field.pattern)"
                      (dblclick)="openFullRTE(field.id)" 
                      (focusout)="field.htmlContent=dataContainer.innerHTML;"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here, I want to see if <strong>field.description</strong> has value "desc" and if so assign the value as empty to <strong>title</strong> attribute or else it can contain the value in field.description. How can I achieve this? Can it be possible using ternary operator ?</p>