<!DOCTYPE html>
<html>
<script src="http://www.sargonco.com/Uploads/Public/article/webdistut/javascript/angular.min.js"></script>
<body>

<p>Change the value of the input field:</p>

<div ng-app="" ng-init="myCol='lightblue'">

<input style="background-color:{{myCol}}" ng-model="myCol" value="{{myCol}}">

</div>

<p>AngularJS resolves the expression and returns the result.</p>

<p>The background color of the input box will be whatever you write in the input field.</p>

</body>
</html>

Change the value of the input field:

AngularJS resolves the expression and returns the result.

The background color of the input box will be whatever you write in the input field.