Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Last active August 30, 2022 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetanelBasal/93a38a2c54ca89d8e9675973b43fb16c to your computer and use it in GitHub Desktop.
Save NetanelBasal/93a38a2c54ca89d8e9675973b43fb16c to your computer and use it in GitHub Desktop.
import NxWelcome from './nx-welcome';
export function App() {
return (
<>
<NxWelcome title="react-platform" />
...
</>
);
}
import { Router } from '@angular/router';
import { useInjector } from '@myorg/ng-react';
export function NxWelcome({ title }: { title: string }) {
const injector = useInjector();
return <>
....
<button onClick={() => injector.get(Router).navigateByUrl('/')}>Home</button>
...
</>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment