如何使用 $scope angularjs 在文本区域换行
How to break line in text area using $scope angularjs
我想为聊天输入框使用文本区域,因为它可以调整大小,因为我想要一些预填充的文本,比如
HI Jhon,
Thanks for contacting us....
我想在 textarea 中的文本后换行。
我的代码-
$scope.message = "Hi "+$scope.firstName+ ",Thanks for contacting us....... ";
我尝试过,使用 break 标记,但没有用
<textarea id="typeMessageBox" placeholder="Write here..." type="text submit" ng-model="message"></textarea>
我该怎么做?
使用 \n 代替分隔符。
例如:$scope.message = "您好"+$scope.firstName+ ",\n 感谢您联系我们......";
我想为聊天输入框使用文本区域,因为它可以调整大小,因为我想要一些预填充的文本,比如
HI Jhon,
Thanks for contacting us....
我想在 textarea 中的文本后换行。 我的代码-
$scope.message = "Hi "+$scope.firstName+ ",Thanks for contacting us....... ";
我尝试过,使用 break 标记,但没有用
<textarea id="typeMessageBox" placeholder="Write here..." type="text submit" ng-model="message"></textarea>
我该怎么做?
使用 \n 代替分隔符。
例如:$scope.message = "您好"+$scope.firstName+ ",\n 感谢您联系我们......";