Deep Links
Tickets, an app that tickets:// links open on an event: tickets://events/jazz-night?seat=B12 opens Jazz Night with seat B12, whether the app was closed or open. The bar at the bottom shows what LynxLinking says about the links. The preview has no links, so tap the events instead.
What it shows
deepLinkSchemesin angular.json —["tickets"]registers the scheme with the phone. See Open the app from a link.provideRouter()— navigates to each link's route:tickets://events/jazz-nightgoes to theevents/:idroute. The event screen has no code for it:withComponentInputBinding()hands it the:idand the?seat=as inputs.LynxLinking.getInitialURL()andonURL()— the root component shows the link that started the app and the last one that arrived.LynxLinking.openURL()— "Follow a link to Film Club" hands atickets://link to the system, which opens it in the app that claims it: this one.
Run it with ng build --platform ios --run or --platform android --run, then open a link with xcrun simctl openurl booted 'tickets://events/jazz-night' or adb shell am start -a android.intent.action.VIEW -d 'tickets://events/jazz-night'.
