camptocamp/ngeo — pull request #69 by elemoine (2014-10-27 15:47:02+00:00)
Title: Add a generic "control" directive

This PR adds an generic "control" directive. The directive is responsible for adding a user-provided control to a DOM element in the page.

Usage:

```html

```

`createControl` is the name of a scope property referencing a function that creates the control instance.

In the controller:

```js
$scope['createControl'] = function(target) {
return new ol.control.MousePosition({
className: 'mouse-position',
target: target
});
};
```

If people agree with the approach I'll write basic unit tests before merging.

Fixes #59 #55.