预期结果
我想更改angularjs中 textarea 输入中 CSS /颜色 textarea
中的字符串mycode的:
HTML
<body>
<div ng-app="app" ng-controller="MainCtrl">
<span ng-click="appResponse(response,displayName)">{{displayName}}</span>
<textarea ng-model="response.value" class="responseData" cols="80"></textarea>
</div>
AngularJs控制器代码:
<script>
angular.module('app', [])
.controller('MainCtrl', function($scope) {
$scope.displayName = "testString";
$scope.appResponse = function(responseValue, tagsValue) {
responseValue.value += ' ' + '(' + tagsValue + ')';
focus('responseData');
};
});
</script>
小提琴