【发布时间】:2018-04-11 14:52:09
【问题描述】:
我是 angulajs 的新手,我正在尝试在用户选择时将图像动态添加到列中。 这是下面的代码,它不起作用。 .cshtml 文件中的代码 ---
<table>
<tr>
<td>
<img ng-src="{{path}}" />
<input type="file" ng-model="path" />
</td>
</tr>
</table>
angularjs 文件中的代码
$scope.path = "";
我遇到了 1 个示例,但它是用 jquery 编写的,而这正是我需要的。 http://jsfiddle.net/dwebexperts/4FGg8/1/
谢谢
【问题讨论】: