i want to check condition before save but still not work what im wrong ?
how to solve it
<
p
>save: Function(e) {</
p
><
p
>var currenVar = e.model.id;</
p
><
p
>var data;;</
p
><
p
>https.get($scope.service URL + currenVar.success(function (result){</
p
><
p
>data= result;</
p
><
p
>for (item in data){</
p
><
p
>if(data[item].id == currenVar {</
p
><
p
>alert('Cannot use this');</
p
><
p
>e.preventdefault();</
p
><
p
>}</
p
><
p
>}</
p
>