I have made a directive for highmaps using angular, map is getting rendered. I need to pass the final configured object back to controller. Hence i am assigning like this in directive,

```
  $timeout(function() {
      scope.mapconfigured = mapConfig;
   });

```

Initially i defined the controller like this,

```
app.controller('mainCtrl', function($scope, DB) {
    $scope.mydata = DB.getStatesData();
    $scope.mapconfigured = {};
}

```

But the **mapconfigured** variable is not getting updated inside the directive and also the controller is not printing what i exactly needed.

I am also initially assigning the mapconfigured variable to the directive

```
  <my-map mapconfigured="mapconfigured" mydata="mydata" header="'Highmap Demo'"></my-map>

```

what is the issue here? Here is the **[APPLICATION](http://fiddle.jshell.net/sajeetharan/9rjgLj67/1/)**

**EXPECTED OUTPUT:**

I need to assign the **mapConfig** object to **mapconfigured** variable of scope inside my controller.