I'am traying to navigate between to pages with angularJS but when i open the main page with my browser it doesn't display anything when i look in the console i see this error :
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
here is my code:
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>
the 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>
any help please i'am begginner!!!!