我已經使用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