ajoslin / angular-mobile-nav

An angular navigation service for mobile applications
http://ajoslin.github.com/angular-mobile-nav
MIT License
785 stars 135 forks source link

multiple views loading on same time when clicking at navigate or back buttons #86

Open ghost opened 10 years ago

ghost commented 10 years ago

When I click at different buttons to navigate back and forth to different pages, this library is loading all the views together. I see that div with "mb-page mb-out" style is still loaded. Am I doing something wrong?

ajoslin commented 10 years ago

Hi @harmanpreetkaur,

Could you put a sample up on http://plnkr.co/edit demonstrating the problem?

On Mon, Dec 16, 2013 at 5:24 PM, harmanpreetkaur notifications@github.comwrote:

When I click at different buttons to navigate back and forth to different pages, this library is loading all the views together. Am i doing something wrong?

— Reply to this email directly or view it on GitHubhttps://github.com/ajoslin/angular-mobile-nav/issues/86 .

AlmogBaku commented 10 years ago

same here.

I can't put example because it part of huge project. It happened mainly in android, and I suspect it happened after multiple page navigation at the same time.

stephen776 commented 10 years ago

I am having the same issue. It is not consistent and I am unable to find a way to reproduce. Happens periodically when navigating to new page

ghost commented 10 years ago

I added following in to app.js to fix it and it doesn't happen anymore:

.config(function($locationProvider){ $locationProvider.html5Mode(); $locationProvider.hashPrefix('!'); }

ghost commented 10 years ago

@ajoslin - My changes are part of big project and it is hard to put it in plunkr. It used to happen periodically until i put following changes in:

.config(function($locationProvider){ $locationProvider.html5Mode(); $locationProvider.hashPrefix('!'); }

stephen776 commented 10 years ago

Awesome! Trying it now. Thanks for the help.

AlmogBaku commented 10 years ago

In my case- I changed back to ng-animate and now it works just great.

‏בתאריך יום שלישי, 4 בפברואר 2014, stephen776 notifications@github.com כתב:

Awesome! Trying it now. Thanks for the help.

— Reply to this email directly or view it on GitHubhttps://github.com/ajoslin/angular-mobile-nav/issues/86#issuecomment-34097871 .

redthor commented 10 years ago

I think I was getting the same issue. Well multiple mb-page div's.

I found the fix was due to the animationend event not firing. Issue came up with https://github.com/ajoslin/angular-mobile-nav/issues/72 and fixed with https://github.com/ajoslin/angular-mobile-nav/commit/d6f1a3b0c693943a8a505422904f5041efc52667 But as per last comment in #72 the mobile-nav.js file hasn't been updated.

So my change is just: https://github.com/redthor/angular-mobile-nav/commit/05b98497d7887c2c05b17723169ef20d5fdbb08c#diff-d41d8cd98f00b204e9800998ecf8427e

I'm not sure why all the sniffing is needed, we could just bind to both strings "animationend webkitAnimationEnd" ?

nehatha commented 8 years ago

I am still getting this issue.None of the above solutions helped.Can any one please help me with this.