Angular JS and jQuery Mobile Routing - Handling Hash Anchors in a URL

This is my first question about SO, so I will try to make it as clear as possible.

I recently started talking with Angular JS, and I'm currently working on a mobile application using Angular JS and jQuery Mobile. So far, I have not had serious problems, and still there is no need to consider any external libraries for integration (for example, the Angular js + jquery mobile adapter). I created a multi-page application (currently only two pages) and used separate controllers for each page (login + content page). The application is simple, it is just a list storage application, and I created a quick jsfiddle based on the ui aspect of the content page: http://jsfiddle.net/G7JNV/4/

The application works as expected from jsfiddle. However, since the content page is a page in one html document (index.html) as the login page, the URL becomes the following to go to the content page:

.../index.html#mainpage

(the main page is the page for the list keeper)

That's when everything starts to laugh. When the URL is similar above when adding an item to the list, the item is initially unidentified (it does not look like part of the list), but the css style for that item is returned after adding another item. Of course, the next element is then painted over (and so on).

If you want to see what the problem looks like:

enter image description here

, - URL- ( , , .../index.html ), Css , .

, , , , , Angular jqm - URL- ( , Angular JS jQuery Mobile).

Angular JS ( jQuery Mobile)!

+4
1

, , .

, - . "" "", ngCloak, .

$locationProvider HTML5 .

0

All Articles