I want to change the status column with a green image if 778. and a red image if 779. this is my html form code
<td> {{$penalty}} </div>
<td> {{$Total)}} </div>
<td> <span id="status">{{$status}}</span> </div>
So, if people open the webpage, they will not see the status column with number again, but become an image.
var status = document.getElementById("status").innerHTML;
if(status == 778){
$('#status').attr('src','https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Button_Icon_Green.svg/200px-Button_Icon_Green.svg.png');
}else{
$('#status').attr('src','https://upload.wikimedia.org/wikipedia/commons/thumb/0/07/Button_Icon_Red.svg/200px-Button_Icon_Red.svg.png');
}
Any javascript idea? thanks in advance.

ng-src.srcattribute to a span tag. You should be using animgtag and adding the attribute to that.ng-src, you are suupose to manipulate src path as well..