Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

Batarang 0.6.0 issue with $routeProvider #178

Closed
Opa- opened this issue Dec 10, 2014 · 3 comments
Closed

Batarang 0.6.0 issue with $routeProvider #178

Opa- opened this issue Dec 10, 2014 · 3 comments

Comments

@Opa-
Copy link

Opa- commented Dec 10, 2014

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
Copy link
Contributor

btford commented Dec 10, 2014

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

@btford
Copy link
Contributor

btford commented Dec 10, 2014

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

@Crashthatch
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants