html:
<input name="image" id="image" type="file" value="" multiple accept="image/*" ng-model="imagePath" ng-change="editPic()" />
controller:
$scope.editPic = function(){
console.log(1);
};
我想在选择图片后,触发一个事件,为什么这样不会触发controller里的事件?谢谢。
html:
<input name="image" id="image" type="file" value="" multiple accept="image/*" ng-model="imagePath" ng-change="editPic()" />
controller:
$scope.editPic = function(){
console.log(1);
};
我想在选择图片后,触发一个事件,为什么这样不会触发controller里的事件?谢谢。
5 回答10k 阅读✓ 已解决
9 回答2.6k 阅读✓ 已解决
14 回答3.7k 阅读
4 回答1.6k 阅读✓ 已解决
6 回答1.3k 阅读✓ 已解决
6 回答2k 阅读✓ 已解决
12 回答5.6k 阅读
我这里有一个 angular 中 input type="file" 的指令,用法是
<input type="file" file-read="uploadMe" />
coffeeScript的格式,自己转换成JS就好