我正在设计一个图像并进行保存。图像是第一次在视图中绑定。当我重新设计相同的时候 图像并再次保存。但视图未更新。
$scope.$on('Save', function () {
vm.save();
if (vm.scenarioStoryBoardData.ScenarioStoryBoard.isDesigner) {
var file = vm.DrawStateService.getBlob();
file.name = vm.parentScenario.replace(" ", "") + "_scenario_storyboard.png";
Upload.upload({
url: BodStudioServicesEndpoint + "TechnologyStoryboardImage/Upload?UserId=" + LoggedInUserGUID,
method: "POST",
data: { file: file },
cache: false
}).then(function (resp) {
vm.scenarioStoryBoardData.ScenarioStoryBoard.ImgSrc = resp.data;
$scope.$parent.studio.saveBodData();
}, function (resp) {
console.log('Error');
}, function (evt) {
var progressPercentage = parseInt(100.0 * evt.loaded / evt.total);
});
}
else
$scope.$parent.studio.saveBodData();
});
<img ng-click="scenarioStoryboard.importGallery();scenarioStoryboard.currParentIndex = -1;scenarioStoryboard.isAllowToDelete = true;" class="img-responsive" ng-if="scenarioStoryboard.scenarioStoryBoardData.ScenarioStoryBoard.ImgSrc" ng-src="{{scenarioStoryboard.imagesUrl}}{{scenarioStoryboard.scenarioStoryBoardData.ScenarioStoryBoard.ImgSrc}}" />