Last active
August 30, 2022 06:33
-
-
Save NetanelBasal/93a38a2c54ca89d8e9675973b43fb16c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import NxWelcome from './nx-welcome'; | |
export function App() { | |
return ( | |
<> | |
<NxWelcome title="react-platform" /> | |
... | |
</> | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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