title: ngRoute combined with react-router
body: <p>Is there a way to make <code>AngularJS’s ngRoute</code> work together with <code>react-router</code> ?</p>
  <p>Main routing is inside the AngularJS application and I tried to add <code>react-router</code> for only a small part of the app but it seems to be conflicting with Angular’s routing. (navigating with <code>NavLink</code> works fine but going back in the browser seems to ignore everything <code>react-router</code> did).</p>
  <p>I have been using <code>AngularJS 1.5.6 or 1.8.x</code> and <code>react-router v5.2.1</code>.</p>
  <p>Below are some snippets for how the application is layered:</p>
  <pre><code>//inside Angular
  .when(&quot;/newRoute&quot;, {
       // this is just a react component injected and rendered inside AngularJs
       template: ‘&lt;div react-bridged-component data-component-name=&quot;RouteView&quot;&gt;&lt;/div&gt;’, 
  })
  
  //inside React
  const RouteView = () =&gt; (
     &lt;Suspense fallback={&lt;div&gt;Loading...&lt;/div&gt;}&gt;
       &lt;BrowserRouter basename=&quot;route&quot;&gt;
         &lt;SomeComponent /&gt;
       &lt;/BrowserRouter&gt;
     &lt;/Suspense&gt;
  );
  </code></pre>