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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -