【发布时间】:2014-12-06 11:18:57
【问题描述】:
当我使用以下 URL 请求链接时出现错误:http://xxx:46630/ 或 http://crmbyzaid.azurewebsites.net/
但是当我添加带有 URL 的 '/index.html' 时效果很好。现在我想在我请求时设置我的部分页面“app/dashboard/dashboard.html”的默认呈现http://crmbyzaid.azurewebsites.net/
我的config-route.js代码是
function routeConfigurator($routeProvider, routes) {
routes.forEach(function (r) {
$routeProvider.when(r.url, r.config);
});
$routeProvider.otherwise({ redirectTo: '/' });
}
function getRoutes() {
return [
{
url: '/',
config: {
templateUrl: 'app/dashboard/dashboard.html',
title: 'dashboard',
settings: {
nav: 1,
content: '<i class="fa fa-dashboard"></i> Dashboard'
}
}
}, {
url: '/admin',
config: {
title: 'admin',
templateUrl: 'app/admin/admin.html',
settings: {
nav: 1,
content: '<i class="fa fa-lock"></i> Admin'
}
}
}
]
}
【问题讨论】:
-
当您尝试访问根 url 时遇到什么错误?
-
@Fedaykin 服务器在“/”应用程序中出错
标签: javascript angularjs azure url-routing hottowel