Search code examples
angularjsdata-bindingangularjs-scope

Angular Js expression in expression


I have an angular expression

<td>{{quote.IsRequired ?'Yes':'No'}} </td>

It will show yes or no value in table.

I have one more expression {{quote.Type}} , this will have any "String"

I have to show this string with Yes in my table.like this Yes - String ('yes' {{quote.Type}}).


Solution

  • Just append it with a plus (+).

    <td>{{quote.IsRequired ? 'Yes - ' + quote.Type : 'No'}}</td>