0

Show, it display the result as per language. Suppose english is there in myAngApp1.value it will display english. But in SharePoint list all the four languages english value so it is displaying result 4 times. My requirement is if myAngApp1.value is equal to english then it should not display 4 times english.

              <span ng-show = "(customer.GLAcctLongTextEN).indexOf(myAngApp1.value)!=-1"> 
                {{customer.GLAcctLongTextEN}}
             </span>
              <span ng-show = "(customer.GLAcctLongTextPT).indexOf(myAngApp1.value)!=-1">    
                {{customer.GLAcctLongTextPT}}
             </span>

              <span ng-show = "(customer.GLAcctLongTextES).indexOf(myAngApp1.value)!=-1">    
                {{customer.GLAcctLongTextES}}
             </span>
              <span ng-show = "(customer.GLAcctLongTextZH).indexOf(myAngApp1.value)!=-1">    
                {{customer.GLAcctLongTextZH}}
             </span>
              <span ng-show = "(customer.GCoAGLcode).indexOf(myAngApp1.value)!=-1">  
                {{customer.GLAcctLongTextEN}}
             </span>
             <span ng-show = "(customer.Title).indexOf(myAngApp1.value)!=-1" >    
                {{customer.GLAcctLongTextEN}}
             </span>
         </td>   
Kedar Kodgire
  • 482
  • 6
  • 22
Sanjeev Gautam
  • 353
  • 3
  • 15

1 Answers1

0

Use ng-switch. below is the sample code.

<p ng-switch="status">
    <span ng-switch-when="wrong">
       Wrong
    </span>
    <span ng-switch-default>
       Correct
    </span>
</p>
selvakumar
  • 634
  • 7
  • 16