标签: angularjs
我有一个来自ng-model =“ commentsText”的textarea,来自模型的值为'我的评论在这里'。如果commentText没有任何值,则仅应将默认文本显示为“ N.A”,但始终显示“ N.A”,而不是绑定的模型值。
<textarea name="myTextArea" class="form-control" rows="3" ng-init="commentsText='N.A'" ng-model="commentsText"></textarea>