Hey all … in my PWA (Ionic/Angular with Capacitor) I’m having a simple 4 slide onboarding/tutorial feature that displays on first open for new users. Used Ionic generate to create a page (Welcome) and I’ve set that as the default in the Router so it always loads first. The last slide has a button that when clicked sets a value using Capacitor Storage and then moves the user to the Home route (/home).
So where is the best or correct place to check for that value? ngOnInit in app.component.ts or a Guard on the /welcome route or somewhere else? Should it be a Service even?
OK so let me get this clear … I check for the presence of and value of hasSeenTutorial using Capacitor and if found use something like this.router.navigate([’/home’]) for instance to skip the Welcome page and go straight to the Home page?
Yes, except I didn’t know “Capacitor Storage” was a thing. Maybe they’ve rebranded it, but I know it as Ionic Storage. With a PWA, you probably want the IndexedDB driver (which I believe is the default).