javascript - HTML Knockout add FontAwesome icon into table using Unicode -


i have been working knockout , fontawesome couple of days , i'm trying display fontawesome icon using it's unicode.

i have list of items called alerts contains different informations alert , 1 icon it.

if (alerts.category == 0)     alerts['category'] = ''; else if (element.category == 1)     alerts['category'] = ''; else if (alerts.category == 2)     alerts['category'] = ''; else if (alerts.category == 3)     alerts['category'] = ''; else if (alerts.category == 4)     alerts['category'] = ''; 

the thing when i'm trying them html page like:

<table class="table" id="alertstable">  <tbody data-bind="foreach: alerts">    <tr style: { backgroundcolor: color, color: textcolor }">     <td>       <button type="button" class="btn btn-default"         data-bind="click:$root.getalertclick, text:vehicleshortname">       22       </button>     </td>     <td>       <i style="font-family: 'fontawesome', 'helvetica'; font-size: 20px;"            data-bind="image:category"></i>     </td>    </tr>  </tbody> </table> 

it displays vehicleshortnames doesn't display icon each 1 of them. possible display icon in table way?

on request op, heres answer... should using class="fa fa-something" class name ;-)


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -