2

I wish to implement angularjs with jquery mobile all works fine except that the jquery mobile css is not applied.

It works when I don't use routing in angularjs but with routing, the css stops working.

What do I do? I also included the jquery-mobile-angular-adapter still it's not working.

1

1 Answer 1

1

"if you generate new markup client-side or load in content via Ajax and inject it into a page, you can trigger the create event to handle the auto-initialization for all the plugins contained within the new markup." - http://jquerymobile.com/demos/1.0/docs/pages/page-scripting.html

To solve this problem you have to tell JQuery to initialize all plugins after Angular loads the content, you can do this in your controller.

$scope.$on('$viewContentLoaded', function() {
    $(document).trigger('create'); //$(document) or just the part that was loaded with ajax
});

I don't know jquery-mobile-angular-adapter, so I can't help with that.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.