私は本当にAngularの新機能です(そして1週間全体を費やす予定です)、私はyoutubeのチュートリアルに従っています。もはやサポートがないので、別の銀河に旅行したにちがいないはずです(しかしすばらしいツタです)。私は家に帰ることはできません.htmlのページをブラウザにレンダリングすると私は完全に失われています。 私はこのURLを手動で入力します: https://chore-master-j-s-thomas-1.c9users.io/home 私が得るエラーは次のとおりです:GET/homeできません だから私はそれが私のルーティングでなければならないと思っています。Angularで、私はレンダーパスを正しく取得できません
これは私のapp.jsページ
var myApp = angular.module('myApp', [
'ngRoute']).
config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider){
$routeProvider.when('/home', {templateUrl: '/partials/home.html', controller: 'homeController.js'});
$routeProvider.otherwise({redirectTo: '/home'});
$locationProvider.html5Mode({enabled: true, requireBase: false}); }])
されており、ここにある私のindex.ejs:
<!DOCTYPE html>
<html lang="en" ng-app="myApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="lib/bootstrap/bootstrap.css" rel="stylesheet"> <!-- Custom styles for this template -->
<link href="jumbotron-narrow.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="header clearfix">
<nav>
<ul class="nav nav-pills pull-right">
<li role="presentation" class="active"><a href="#">Home</a> </li>
<li role="presentation"><a href="#">About</a></li>
<li role="presentation"><a href="#">Contact</a></li>
</ul>
</nav>
<h3 class="text-muted">Chore Master</h3>
</div>
<p class='container' style="margin-left: 50" align="left" >text</p >
<!-- Main Container -->
<div class="container">
<div ng-view></div>
</div>
</div> <!-- /container -->
<!-- scripts to import for angularjs goes here -->
<scripts type="text/javascript" src="libs/angular/angular.js"> </scripts>
<scripts type="text/javascript" src="libs/angular-route/angular- route.js"></scripts>
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/controllers/homeController.js"> </script>
</body>
</html>
、その後、私のホームコントローラ:
myApp.controller('homeController', ['$scope', function($scope){
}]);
私は本当に私のギターのほかに何が助けになるのかはっきりしないが、誰かが私が間違っていることと私が勉強する必要がある角の部分を教えてもらえますか?
ここに私のGitHubのレポです: https://github.com/J-S-Thomas/Chore_Master.git