Within my application that utilizes the MEAN stack, I am using AngularJS as the front-end technology. How can I manually change the color representation of a tolerance value to 159.06 in a table? Check out my Plunker for more details.
Please refer to my Plunker for guidance.
We have implemented the use of
ng-show
in the tolerance field, where if the value is greater than 100, it should be highlighted in red.If the value is less than 100, it should be highlighted in green.
We are aiming to highlight the tolerance value in red if it's over 100 and then switch the color to green once it's approved. Any suggestions on how we can achieve this manually?
If you have any ideas for a solution, please assist us with your expertise.
My HTML:-
<td > <p ng-show="{{(mani.invoice_quantity *1) + (mani.conversion_rate *1) | number:2}}>100" style="background-color: red;">{{(mani.invoice_quantity *1) + (mani.conversion_rate *1) | number:2}}</p>
<p ng-show="{{(mani.invoice_quantity *1) + (mani.conversion_rate *1) | number:2}}<100" style="background-color: Green;">{{(mani.invoice_quantity *1) + (mani.conversion_rate *1) | number:2}}</p></td>
My data:-
$scope.sryarndebitnote = [
{
"_id": "57ac1b6d82e1c5940ac3c730",
"user": {
"_id": "57400c32bd07906c1308e2cf",
"displayName": "mani selvam"
},
"__v": 0,
"created": "2016-08-11T06:30:05.118Z",
"shipment_id": "57ac19b982e1c5940ac3c72f",
"conversion_rate": "62.04",
"invoice_value_fob_currency": "Rs",
"invoice_value_fob": "300.231",
"invoice_quantity_unit": "KG",
"invoice_quantity": "37",
"invoice_date": "2016-08-17",
"supplier_name": "Msd",
"buyer_name": "Mani selvam .R"
},
{
"_id": "57b5af69df0475401f644b2e",
"user": {
"_id": "57400c32bd07906c1308e2cf",
"displayName": "mani selvam"
},
"__v": 0,
"created": "2016-08-18T12:51:53.671Z",
"shipment_id": "57b5af5bdf0475401f644b2d",
"conversion_rate": "62.06",
"exclusive": true,
"invoice_value_fob": "400.343",
"invoice_quantity": "97",
"supplier_name": "Msd",
"buyer_name": "Mani selvam .R"
},]
- You can find my plunkr example here :- My Plunker