angular / batarang

AngularJS WebInspector Extension for Chrome
MIT License
2.43k stars 338 forks source link

Batarang 0.6.0 issue with $routeProvider #178

Closed Opa- closed 8 years ago

Opa- commented 9 years ago

Hi,

I have an app using $routeProvider and Batarang is breaking it. I've got something like that in my app.config :

app.config(['$locationProvider', '$routeProvider',
        function ($locationProvider, $routeProvider) {
            $locationProvider.html5Mode(false);
            $locationProvider.hashPrefix("!");
            $routeProvider.
                when('/dashboard', {
                    templateUrl: '/static/js/ng/dashboard/views/index.html',
                    controller: 'dashboardCtrl'
                }).
                when('/settings', {
                    templateUrl: '/static/js/ng/settings/views/index.html',
                    controller: 'settingsCtrl'
                }).
                otherwise({
                    redirectTo: '/dashboard'
                });
        }]);

My login page is redirecting to www.example.com/pro/, and the correct behaviour of the code is to add #!/dashboard to the url with the otherwise. When Batarang is activated it's freezing on /proinstead of redirecting to www.example.com/pro/#!/dashboard and because of that, AngularJS isn't loaded at all.. If I make a reload of the broken page, everything back to normal and AngularJS is loaded.

I'm on Chrome 39.0.2171.95 using AngularJS 1.3.0 rc3

btford commented 9 years ago

Can you please provide a runnable reproduction via jsbin, plnkr.co, or jsfiddle? This saves me a lot of time. Thanks!

btford commented 9 years ago

Can you also please make sure you're on the latest Batarang (v0.7.1)?

Crashthatch commented 9 years ago

I think this is a duplicate of #167 where angular doesn't load, meaning the routing doesn't trigger.