javascript - Conditionals: Replacing a value with a glyphicon -


i trying make if in table status 'r' replace 'r' glyphicon, glyphicon glyphicon-alert.

i've thought of different ways of doing such making true or false condition because having 'g' appear not necessary (if assist making if 'g' display ' ' of use too) haven't made headway that.

can assist in this?

this plnkr of code in question.

http://plnkr.co/edit/ctrlmfnw4bxxy8wyhtsp?p=preview

<tbody>          <tr class="tt" data-toggle="tooltip" title="click more information on {{x.c}}." ng-click="iscollapsed = !iscollapsed" ng-repeat-    start="x in projects | filter:query | filter:myfilter | orderby:orderproperty">             <td class="shrink"><b>{{x.a}}</b></td>             <td class="shrink">{{x.b}}</td>             <td class="shrink"><u>{{x.c}}</u></td>             <td class="shrink">{{x.d}}</td>             <td class="shrink">{{x.e}}</td>             <td class="shrink">{{x.f}}</td>         </tr>          <tr collapse="iscollapsed" ng-repeat-end="">           <td colspan="6">               <h3>test</h3>               <p>test</p>           </td>         </tr> </tbody> 

i fix this

<tr class="tt" data-toggle="tooltip" title="click more information on {{x.c}}." ng-click="iscollapsed = !iscollapsed" ng-repeat-start="x in projects | filter:query | filter:myfilter | orderby:orderproperty">    <td ng-class="{'glyphicon glyphicon-alert': x.a == 'r'}"><b ng-if="x.a != 'r'">{{x.a}}</b></td>    <td class="shrink">{{x.b}}</td>    <td class="shrink"><u>{{x.c}}</u></td>    <td class="shrink">{{x.d}}</td>    <td class="shrink">{{x.e}}</td>    <td class="shrink">{{x.f}}</td> </tr> 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -