I am new to this, I want to change the value of a variable when the button is fired. I have an array selectedValues, which contains a status of a project i.e Ready/NotReady.
What I want to do is to change the status to Not Ready if the status is Ready and vice versa.
I want a js function to do this. I was wondering if I could do it like this?
$scope.changeStatus = function(selectedValue){
if(selectedValue.status == "Not_Ready")
selectedValue.status = "Ready"
}