/** * A react component implemented using the ngReact library */ var testComponent = React.createClass({ propTypes: { prop1: React.PropTypes.string.isRequired, prop2: React.PropTypes.string.isRequired }, render: function() { return React.DOM.span(null, 'This is a react component: ' + this.props.prop1 + ' ' + this.props.prop2 ); } }); angular.module('quayPages') .value('TestComponent', testComponent) .directive('testComponent', function(reactDirective) { return reactDirective(testComponent); });