vendredi 16 septembre 2016

AngularJS change css after comparison to a self-sorted string

I have small question about angularjs controllers suppose i have a div tag that display the parameters like this

 <div ng-controller="mainCtrl" class="table-cell" id="account">
 </div>

Account number is a random number stored like this

accountNumber="214323"

and the sorted string is :

sortedNumber="122334"

Here is the thing i want to do:

sort it in a increasing order and compare the 2 number

if they are same i would put the background color to light blue.

if not keep it like that way.

Aucun commentaire:

Enregistrer un commentaire