I am trying to change the color of a textarea
in an Angular app using jQuery but it does not work.
What should I do? It says $ is not defined
.
HTML:
<body>
<div ng-app="myApp" ng-controller="testController">
<textarea id="abc">abc
</textarea>
</div>
</body>
</html>
Angular js:
var app = angular.module('myApp', []);
app.controller('testController', function($scope, $http) {
var tdVal =$("#abc");
var x = tdVal.innerHTML;
tdVal.html ("<span style='color: rgba(220, 0, 0, 1)'>" + x"</span>");
});