私はangularJSでページを移動するのに慣れていますが、私のブラウザで、それは私がコンソールに見たとき、私はこのエラーが表示何も を表示しません:ここAngularJSエラーCross originリクエストは、http、data、chrome、chrome-extension-resource、https、chrome-extension-resourceの場合にのみサポートされます。
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
は私のコードは次のとおりです。
ViewsTestPage:
<html>
<head>
<title>Views Test</title>
<script src="angular.min.js"></script>
<script src="angular-route.min.js"></script>
<script src="controller.js"></script>
</head>
<body ng-app="myApp">
<div ng-view></div>
</body>
</html>
controller.js:
var mainApp = angular.module('myApp', ['ngRoute']);
mainApp.config(function($routeProvider){
$routeProvider
.when('/', {
templateUrl: 'UsersPage.html'
})
.when('/helloUser', {
templateUrl: 'hello.html'
})
.otherwise({
redirectTo: '/'
});
});
UsersPage:
Hello world <a href="#/helloUser">Hi users</a>
hello.html
<h1> Users Page</h1>
begginner i'am任意の助けてください!!!!
このレスポンスは表示されていますが、私はこれを行う方法がわかりません。行う??? –
ノードがインストールされているか、Webstormがインストールされていますか? – sumair