Thursday, 25 May 2017

why $scope.logo is undefined in controller ?

This is my HTML form

<form ng-submit='create()'>
    ..
    .
    .
    <input type='file' ng-model='logo' accept="image/*">
</form>

this is my controller :

$scope.create = function () {
        $scope.Ent = {}
        $scope.Ent.logo = $scope.logo;

This is my console only input file is undefined and all other fileds are alright



via Marouen Ayadi

No comments:

Post a Comment