angular-ui/ui-ace — pull request #36 by slopjong (2014-04-06 17:58:04+00:00)
Title: Data binding support added for ace options and JSDoc blocks added

* Added support for data binding of the ace options which can be changed during runtime.
* JSDoc blocks added.

With my changes there's more flexibility on higher application layers. If you'd create a directive based on ui-ace this looked as follows:

In a HTML file:
```

```

In the corresponding directive:
```
angular.module("jsoneditor", ['ui.ace'])
.directive("jeAce", function($compile) {
return {
restrict: 'EA',
template: '

',
replace: true,
transclude: true
};
});
```

Somewhere in the controller of a higher application layer:

```
$scope.jsoneditor = {
json: '{test: "tasdfasdf"}',
ace: {
options: {
mode: 'xml',
onChange: function() {
console.log('onChange1');
}
}
}
};

// we simulate a change
$timeout(
(function(scope){
return function(){
scope.jsoneditor.ace.options.mode = 'json';
scope.jsoneditor.ace.options.onChange = function() {
console.log('onChange2');
};
}
}($scope))
, 3000
);
```
The ace options are smoothly passed to the ui-ace directive being watched after linking.

The *old* way still works with the json directly passed.
```
angular.module("jsoneditor", ['ui.ace'])
.directive("jeAce", function($compile) {
return {
restrict: 'EA',
template: '

',
replace: true,
transclude: true
};
});
```

The tests were successful (on my local machine). Nothing failed.