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="/">
多くの安全でないタイプのエラーを伴うページハーフロードの代わりに。