php - Angularjs Form input text is always undefined -
here 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 password</button> </form>
inside app.js
have
.when('/forget', { title: 'forget', templateurl: 'resources/views/forget.php', controller: 'authctrl' })
and inside authctrl
controller tried console of input value.
$scope.doforget = function (customer) { console.log($scope.email); };
but getting console undefined
always.
how can value ?
no need define email
just
$scope.forget={};
and value in controller
$scope.forget.email
Comments
Post a Comment