angularjs如何获取表单textarea的value的length,想用这个length的长度来判断另一个p显示与否
<p ng-show="">文字长度大于1显示,否则隐藏</p>
<textarea ng-model="test" placeholder="输入文字"></textarea>
世界只因有你2017-05-15 16:54:23
You can judge the length directly through $scope.test
拿到textarea
的value
,然后.length
.
世界只因有你2017-05-15 16:54:23
ng-model has bound the value of textarea to the variable $scope.test, and directly determines the length of $scope.test