Skip to content

Instantly share code, notes, and snippets.

View rxgx's full-sized avatar

Ryan Gasparini rxgx

View GitHub Profile
@rxgx
rxgx / merge-filter-branch.md
Last active August 18, 2021 19:08 — forked from trongthanh/gist:2779392
How to move a folder from one repo to another and keep its commit history
@rxgx
rxgx / gist:b24b43fa8ec436e3d6e3
Last active June 9, 2020 23:34
Render a React Component with Angular Router

For coupling new ReactJS components with legacy angular routing/services.

  • 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) {