javascript - AngularJS $scope.model is undefined -
angularjs $scope.model undefined when initialize via javascript <button ngf-select="upload($file)">Выбрать</button> <span id="photospan"></span> <input type="text" id="photo" name="uploadphoto" ng-model="uploadphoto"> here initialization code: document.getelementbyid("photo").value = filename; $("#photospan").text(resp.config.data.file.name); console.log('success ' + resp.config.data.file.name + 'uploaded. response: ' + resp.data); so createexpositionresource.photo = $scope.uploadphoto; console.log('--------------'+$scope.uploadphoto); returns undefined . what doing wrong? thank you! what doing wrong? using jquery: have @ question: "thinking in angularjs" if have jquery background? you should replace document.getelementbyid("pho...