Form elements
<input ng-model="student.person.firstName" type="text"/>
<textarea ng-model="student.person.photo" id="imageText" >
</textarea>
<input type="file" ng-model="" id="imageUpload" onchange="getbase64();"/>
base64()
method sets the text for <textarea>
.
Now JS code
$scope.saveInfo = function(){
console.log($scope.student.person.firstName);
console.log($scope.student.person.photo);
};
I don't get anything in person.photo whereas person.firstName
gets me the value of the name.
Is there a binding problem because i'm setting the value of the <textarea>
using js with base64 content
http://plnkr.co/edit/cElm8PD3hNzEWBNesegW?p=catalogue plunker link.