Deep Link should show Loading screen


#1

Hi,

I am developing a SPA that runs on the web that has deep links.

For the deep links I am using pages like:

@IonicPage({
  name: 'example',
  segment: 'example'
})
@Component({
  templateUrl: 'example.html'
})
export class ExamplePage {}

That works well and this page is available under http://localhost:8100/#/example

So far so good but now I want to load some userdata from the server before I show the user his page and because it could take awhile to load the data I want to show him a loading page meanwhile.

So actually I would like to have something like:

  • user enters deep link to his browser
  • always showing loading screen the first time the app loads
  • load userdata and check if the user is allowed to see the page
  • if user is not logged in redirect him to a login page and remember where wanted to go to redirect him afterwards to that page again
  • if user is not allowed redirect to users home page and show a notification that the requested page is not visible for him
  • if user is allowed then show him the page

Can someone help me to come there?