2
AngularJS $scope.model
是不確定的,當我通過Javascript
<button ngf-select="upload($file)">Выбрать</button>
<span id="photoSpan"></span>
<input type="text" id="photo" name="uploadPhoto" ng-model="uploadPhoto">
這裏初始化它是我的初始化代碼:
document.getElementById("photo").value = fileName;
$("#photoSpan").text(resp.config.data.file.name);
console.log('Success ' + resp.config.data.file.name + 'uploaded. Response: ' + resp.data);
所以
createExpositionResource.photo = $scope.uploadPhoto;
console.log('--------------'+$scope.uploadPhoto);
回報undefined
。
我在做什麼錯?
謝謝!
好奇。謝謝!爲我工作。 –