lundi 21 août 2017

if-else not working in ionic app

I've got a selectbox in the site and wanna change another value by this selectox result.

 var item = vm.complaintData.item
  if (item == 'test') {
    var another = "done!";
  } else if (item == 'test1') {
    var another = 'not doneé';
  }

When I check item on console.log, it works fine. But if-else conditions not working, always getting first condition result. Whats the problem?

Aucun commentaire:

Enregistrer un commentaire