Hello Sir,
In ready function I have used to find user name.
var query = “SELECT user_id FROM useridinfo”;
$cordovaSQLite.execute(db, query).then(function(res) {
if(res.rows.length > 0) {
alert("deviece ready :"+res.rows.item(0).user_id);
} else {
console.log("No results found");
}
}, function (err) {
console.error(err);
});
i have fond my use name above the alert. But i can not to set user Name to input field. my input filed is
In my input field I have used
ng-model=“user.uname”
My controller is
.controller(‘SignInCtrl’, function($scope, $state, $http, $rootScope, $ionicLoading, $timeout,$ionicPopup,$filter,$cordovaSQLite) {
})
How to set my user name onload view page into the input field
Please help me…