Sono molto nuovo in Angular SPA e per la prima volta ottengo un codice da Google e provo a eseguire. Ma ricevo alcuni errori in Console. Non riuscivo a capire perché, ho trovato la lista dei seguenti errori Console:Errore: impossibile eseguire "invio" su "XMLHttpRequest": impossibile caricare "file": AngularJS SPA
XMLHttpRequest cannot load file:///C:/Users/hp/Downloads/single-page-app-angularjs-master/home.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
Error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///C:/Users/hp/Downloads/single-page-app-angularjs-master/home.html'. XMLHttpRequest cannot load file:///C:/Users/hp/Downloads/single-page-app-angularjs-master/about.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
Error: [$compile:tpload] http://errors.angularjs.org/1.3.3/ $compile/tpload?p0=home.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Single page web app using Angularjs</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular-route.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="script.js"></script>
</head>
<body ng-app="single-page-app">
<div ng-controller="cfgController">
<div>
<nav class="navbar navbar-inverse" role="navigation" style="padding-left:130px;">
<ul class="nav navbar-nav">
<li class="active"><a href="#/">Home<span class="sr-only">(current)</span></a></li>
<li><a href="#/about">About us</a></li>
<li><a href="#/about">Read tutorial</a></li>
</ul>
</nav>
</div>
<br/>
<div ng-view class="jumbotron"></div>
</div>
</body>
</html>
sembra si esegue in un problema CORS: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing – BuddhistBeast
Tipicamente, Ajax isn' t supportato quando si utilizza 'file: //'. Dovrai servire e accedere alla pagina attraverso un server HTTP. Nota: [http one-liner server statico] (https://gist.github.com/willurd/5720255) –
Penso che questo problema abbia così tante soluzioni che stavo usando per effettuare chiamate su jax. All'inizio non ho capito l'errore, ma questo non è altro che non ho attivato la mia rete ---- >>>>. – santhosh