- Create a function that returns the angular route object. This object contains a controller that handles the mounting and unmounting of the React component, as well as a container template to render the component inside of. Note: the
containerId
is arbitrary and only exists to identify the container the component will be placed in.
var registerRouteForComponent = function (componentClass) {
var containerId = 'reactComponentRender';
var controller = function ($scope, $injector) {