【发布时间】:2014-05-06 10:49:59
【问题描述】:
在 asp web api 中,我有一个带有 angularjs 框架的 index.html。
在 angularjs 我有以下路线:
gestionale.config(function ($routeProvider, $locationProvider) {
$routeProvider.
when('/', {
templateUrl: 'View/people.html',
controller: 'mainController'
}).
when('/ruoli', {
templateUrl: 'View/ruoli.html',
controller: 'ruoliController'
});
});
当我使用 Visual Studio 启动项目时,它会在以下网址打开 index.html:
http://localhost:49375/index.html#/
视图“View/people.html”正确显示。
1)如何在 index.html 中放置 ruoli.html 页面的静态链接?我试过了
<a href="/ruoli">
但由于它加载页面而不起作用
http://localhost:49375/ruoli
而不是
http://localhost:49375/index.html#/ruoli
【问题讨论】:
标签: javascript html asp.net asp.net-mvc angularjs