I would like to be able to pass in an authenticated sessionId to an Ionic app from another site, both are in the same domain being served off the same server.
I’ve found out how to call a specific page in an Ionic app using the latest deep linking functionality described by Josh Morony.
The call would look like: http://localhost:8100/#/landing_page
Defined in Ionic by:
@IonicPage({
segment: ‘landing_page’
})
This allows me to call into my new Ionic app at a specific point. Now I need to pass it some session data. The same article sort of discusses it by defining it as:
@IonicPage({
segment: ‘landing_page/:sessionId’
})
However he just talks about passing in the data from within the app using the normal navCtrl.push() call.
Does anyone know how to get the data from the URL when sent in like:
http://localhost:8100/#/landing_page/sessionId
It would be nice if the sessionId would just be part of the NavParams, but that doesn’t seem to be the case.
I’m also open to using a cookie, but don’t know how to access cookies from within Ionic.
Some background: I’m new to Ionic development and I’m experimenting with expanding an existing site to include a new section written in Ionic. So it would start out as kind of an Ionic desktop app and later we would also use it on native platforms.
Any ideas?