angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.12k stars 1.24k forks source link

ui-router $urlRouterProvier.otherwise ignored #1004

Closed fullstackwebdev closed 9 years ago

fullstackwebdev commented 9 years ago

Create a vanilla project with ui router, go to app.js, change $urlRouterProvider.otherwise('/') to '/login', no matter what it will be ignored. Any solution?

Awk34 commented 9 years ago

Works fine for me

fullstackwebdev commented 9 years ago

I still was unable to get it to work so I tried doing this on a fresh install of a server, with the latest node, npm and fresh install of yeoman generator-angular-fullstack, I made only one change:

[www@foobar statetest]$ git diff
diff --git a/client/app/app.js b/client/app/app.js
index 06f98ed..be5cb98 100644
--- a/client/app/app.js
+++ b/client/app/app.js
@@ -10,7 +10,7 @@ angular.module('testApp', [
 ])
   .config(function ($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider) {
     $urlRouterProvider
-      .otherwise('/');
+      .otherwise('/login');

And I still was not redirected to /login on startup. I guess what I am trying to figure out is how this was able to work for you but not me? I included the complete log of my terminal : http://pastebin.com/1ycXv9Hn

Awk34 commented 9 years ago

what happens when you enter localhost:9000/asdf into your address bar?