I;m trying to get the username from the input field and pass to the function to create a user account but the username input in the field does seem to be updated in model.

I used window.alert to display the username just for the test purpose.
login.html
ion-view view-title="Login">
<ion-content>
<div class="list list-inset" padding>
<div class="item-divider" align="center"> Login</div>
<label class="item item-input">
<span class="input-label">UserName</span>
<input ng-model="username" type="text" placeholder="Email">
</label>
<label class="item item-input">
<span class="input-label">Password</span>
<input ng-model="password" type="password" placeholder="Your Password">
</label>
</div>
<center><button class="button button-positive " ng-click="log()">Login</button> </center>
app.js (not the whole code)
blog.config(function($stateProvider,$urlRouterProvider){
$stateProvider
.state('mainlist',{
url:'/mainlist',
templateUrl:'templates/MainList.html',
controller:'listCtrl'
})
.state('login',{
url:'/login',
templateUrl:'templates/login.html',
controller:'loginCtrl'
});
blog.controller('loginCtrl',function($scope)
{
$scope.log=function()
{
var username= $scope.username;
window.alert(username);
}
}
);
