How to embed Angular application inside a React application?

Viewed 2103

I have an existing Angular app using TypeScript and Angular-CLI version 1.7. Now I want to embed the entire angular application inside of a parent react application. Such as when a specific route is reached in the react app, it should render the angular app and that URL will become base-href for the angular app and routing inside angular app should work. Also, it should remain as a Single Page Application that it was.

I was looking out for a solution in which I could do

class AngularComponent extends Component {
    componentDidMount() {
        platformBrowserDynamic().bootstrapModule(AppModule);
    }

    render() {
        return <app-root><app-root>;
    }
}

I am not sure how I can import AppModule with all its functionalities in a React Component class.

0 Answers
Related