1

I'm using in my app:

app.config(function ($routeProvider, $locationProvider, $httpProvider) {
$routeProvider
    .when('/', {
        templateUrl: '/index.html',
        controller: 'mainController'
    })
    .when('/login', {
        templateUrl: '/views/login.html',
        controller: 'LoginController'
    })
    .when('/user/list', {
        templateUrl: '/views/users/list.html',
        controller: 'userListController'
    }) 
    });
$locationProvider.html5Mode(true);
});

and in html there is <base href="/">. I'm using this app in google app engin. In app.yaml:

- url: /(user)/.*
  static_files: index.html
  upload: index.html

everything is ok with links that starts with user. But in login there is 404 Not Founderror. Any advise about solution would be appreciated.

TheNone
  • 5,684
  • 13
  • 57
  • 98

1 Answers1

1

Remove $locationProvider.. it produces many conflicts as said here: https://docs.angularjs.org/api/ng/provider/$locationProvider

Use the $locationProvider to configure how the application deep linking paths are stored.

Next remove the argument $httpProvider, because in the code you provided you are not using the provider anywhere in your .config() function... Hope this helped.

EDIT App.yalm i think should look more like this..

handlers:
- url: '/' 
    script: main.app

Can you take a look at this question to get a better understanding? Hope this helped!

Community
  • 1
  • 1
amanuel2
  • 4,508
  • 4
  • 36
  • 67
  • I think it is an issue from app.yaml configs. Because there is the same problem with removing $locationProvider and $httpProvider – TheNone Mar 15 '16 at 22:01
  • 1
    No Problem @TheNone any time... (Dont ask me how i responded this fast im a ninga :P) – amanuel2 Mar 16 '16 at 10:51