How do I pass a value from my controller to <input>tag in my view? I got the data successfully but calling it from the html, it's not working? I don't get any errors, my syntax is just wrong, I tried several syntax base from angularjs documentation, I also tried using ng-value={{data.email}} and even placing double quotes between the value. What is the proper way to do this?
this is my html:
<label class="item item-input">
<input type="text" placeholder="Email" value={{data.email}} disabled>
</label>
this is my controller:
$http({
method: 'POST',
url: 'myservice',
data: encodedString,
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}).success(function (data) {
for (i = 0; i < data.length; i++) {
if (data[i].QActivationCode === data[i].token) {
$scope.userData = data[i];
Acct.setAcctEmail(data[i].email);
}
}
});
data, but you actually assign the data to$scope.userData