我已经使用ng-paste
作为textarea,同时粘贴textarea中的链接,我正在调用一个自定义函数来存储该值。请参考以下代码angularjs ng-paste不更新模型值
<textarea rows="1" ng-model="myObj.content"
ng-paste="getContent(myObj)">
</textarea>
$scope.getContent = function(a){
console.log(a.content);
}
但是在控制台中总是得到undefined
的值。我如何获得我的对象值?
编辑我的答案,希望它有帮助! – 2014-10-27 17:49:29