[I need help with binding the 0th index of a splitted value to ngclass in my .html file without using backend. Can anyone provide assistance?
Here is the code in my .ts file:
response = "success&2018-12-19 09:26:03";
this.status = response;
This is how I have it in my .html page:
<div ngClass="row.status.split['&'][0]">{{row.status.split['&'][1]}}</div>
And here is the corresponding style in my .scss file:
.success {
background-color: #4A993A;
height:25px; width:200px;
border-radius:4px;
color: white;
margin-right: 9px;
text-align: center;
padding-top:3px;
}
I'm struggling with getting the correct syntax for ngclass when dealing with dynamic values from splitting.