Here is my form
<form>
<input class="text_box1" type="text" name="email" ng-model="forget.email" >
<button style="width:auto" class="sign_up" ng-click="doForget(forget)">Get a Password</button>
</form>
Inside my app.js I have
.when('/forget', {
title: 'forget',
templateUrl: 'resources/views/forget.php',
controller: 'authCtrl'
})
And inside the authCtrl controller i tried to do the console of the input value.
$scope.doForget = function (customer) {
console.log($scope.email);
};
But i am getting the console as undefined always.
How can i get this value ?
forget.emailand you are outputting$scope.emailconsole.log(customer);?console.log(forget.email);i am getting errorReferenceError: forget is not definedconsole.log(customer);i am getting the$scope.forget()in the console