I'm trying to create a one-site mobile app using AngularJS and jquerymobile, deploying it as a "native" app using PhoneGap. The one-page navigation is build up similar to this jsfiddle, using jquerymobiles data-role="page"
for in-page navigation.
<div id="page-1" data-role="page">..some content for page one</div>
<div id="page-2" data-role="page">..some content for page two</div>
The app should provide a login screen to the user. After a successful login the user is able to access the rest of the app.
The app is the mobile companion for a Django driven web portal. Regarding the web portal things are straight forward. I log the user in and check on the server whether the user is allowed to access a certain view.
For the mobile client I'm a bit lost. Do I have to implement some kind of tokken authentication? How can I get the csrf
token into my angularjs
scripts to do some ajax calls (GET and POST) to my backend? How can I refresh page-1
independent from page-2
? I would look for some hints where to start and what to take care off.