我有角度应用程序,它在本地工作正常,但当我决定在线上传到example.com/app/production/
之类的目录时,例如我尝试打开像example.com/app/production/#/login
这样的登录页面时,它会将我重定向到example.com/#/login
,我该怎么办?
这是我的角度路线设置
app.config(function ($routeProvider, $locationProvider) {
// It's like constructor, it will run on the beginning of the app
$routeProvider.when('/', {
templateUrl: 'dashboard/dashboard.view.html',
controller: 'dashboardCtrl'
})
.when('/onboarding', {
templateUrl: 'onboarding/onboarding.view.html',
controller: 'onboardingCtrl'
})
.when('/login', {
templateUrl: 'login/login.view.html',
controller: 'loginCtrl'
})
.when('/queryList', {
templateUrl: 'queryList/queryList.view.html',
controller: 'queryListCtrl'
})
.when('/company', {
templateUrl: 'company/companySettings.view.html',
controller: 'companyCtrl'
})
.when('/dashboard', {
templateUrl: 'dashboard/dashboard.view.html',
controller: 'dashboardCtrl'
})
});