davidchang/ngReact — pull request #15 by kasperp (2014-10-29 06:40:11+00:00)
Title: React directiv accepts react components

@davidchang this adds whats suggested in #10, so React Components can be passed directly to `reactDirective` like this (strings are still supported):

```javascrtipt
app.value('HelloComponent', React.createClass({
render: function() {
return Hello;
}
}));

app.directive('hello', function(reactDirective, HelloComponent) {
return reactDirective(HelloComponent);
});
```
To get this working I refactored the code a little by
* Pulling out common functionality
* Not using `reactComponent` inside reactDirective` but call `React.renderComponent` instead

NOTE: this also includes the tests from #14