JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="colorApp">
<div ng-controller="ColorCtrl">
<input type="button" value="set color" ng-click="demo()">
<span ng-style="myStyle">Sample Text</span>
<pre>myStyle={{myStyle}}</pre>
</div>
</div>
CSS
span {
color: red;
font-size: 12px;
font-family: 'Arial,Helvetica Neue,Helvetica,sans-serif;
}
JavaScript
var app = angular.module('colorApp',[]);
app.controller('ColorCtrl', function($scope){
$scope.myStyle = {};
$scope.demo = function(){
$scope.myStyle = {
'color': 'green',
'font-size': '42px',
'font-family': 'Arial,Helvetica Neue,Helvetica,sans-serif'
};
}
});