I started learning angular a few days ago and I've been trying to update a div's colour based on a users text input but I can't seem to get it to work and I'm wondering if I'm going about it the wrong way or not. 

I've seen many posts and answers on these topics where people want to update the color using checkboxes or something similar. For this there are a set amount of colors allowed so classes can be created and the ng-class directive can be used. Obviously I could do this with the text input box but I'm looking for functionality that allows for any possible hex colour value and I'd rather not write out every class for that.

My though was that this would work: 

HTML

```
<div ng-app='root' ng-controller = 'index'>
  <input type ='text' ng-model ='myColour'>

  <div ng-style = "{'color': {{myColour}}}" >
  </div>
</div>

```

JS

```
(function(){
  var app = angular.module("root", []);

  app.controller("index", function() {

  });
})();

```

I don't really understand why this doesn't work so I'd appreciate if anyone would be able to explain why and possibly point me towards a better approach?

EDIT: For anyone who might also need a solution the problem was that in 

```
<div ng-style = "{'color': {{myColour}}}" >

```

I had to get rid of the double curly braces but keep the single quotes around color like this 

```
<div ng-style = "{'color': myColour}" >

```