我正在使用 AngularJS 1.3。我的项目 url 是http://localhost/MyProject/app/#/index.html 我想在 url http://localhost/MyProject/index.html打开 index.html 我该怎么做?谁能帮忙?谢谢
angular.module('myapp').config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$locationProvider', function ($stateProvider, $urlRouterProvider, $httpProvider, $locationProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider.state('index', {
url: '/',
controller: 'homeController',
templateUrl: 'templates/home_page.html'
}) $locationProvider.html5Mode(true);
}]);
如果我使用
<base href="index.html">
代替<base href="/">
页面一半加载有许多不安全的类型错误。