Unexpected behavior, Views are changing automatically.

12 views
Skip to first unread message

tpessegueiro

unread,
Sep 27, 2016, 5:50:47 AM9/27/16
to AngularJS
I have an issue that is happening in both IE and Firefox. On Chrome it is working as expected.

I have the following routing defined:

    var app = angular.module('EmailSPGroupsApp', ["ngRoute"]);
    app.config(function ($routeProvider) {
        $routeProvider
            .when("/GroupsView", {
                templateUrl: "GroupsView.html"
            })
            .when("/EmailsView", {
                templateUrl: "EmailsView.html"
            }).otherwise({ redirectTo: '/GroupsView' })
    });

I have in my app a button to move to change my view, and it does it like this:

 $scope.nextPage = function () {

      ....
            $location.path(location);
        };

Where location ="/EmailsView".

When I trigger nextPage , it changes the view, but after a few seconds it reverts automatically to the previous view. (On Firefox this is a lot quicker so it seems as if it is just refreshing the GroupsView.

if you need more info, just let me know.

Zlatko Đurić

unread,
Sep 28, 2016, 3:09:58 AM9/28/16
to AngularJS
What's in the EmailsView? An error there somewhere might cause the rollback.

tpessegueiro .

unread,
Sep 28, 2016, 4:02:21 AM9/28/16
to ang...@googlegroups.com
I don't think that it might be that. 

I've experimented switching the views, leaving just a blank view and it continues to happen.

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/0zqYNn1xoEA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+unsubscribe@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.



--
Com os melhores cumprimentos / Best Regards


Tiago Pessegueiro
Reply all
Reply to author
Forward
0 new messages