서식에 대해 사과하겠습니다. 나는 휴대 전화에서 올리고있다. 내 /public/js/app.js에서Angularjs 라우팅은 '/ webpage'를 얻을 수 없습니다.
나는이
var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/", {
templateUrl : "/public/views/index.html"
})
.when("/packages", {
templateUrl : "/public/views/packages.html"
})
.when("/contactus", {
templateUrl : "/public/views/contactus.html"
})
.when("/signup", {
templateUrl : "/public/views/signup.html"
})
. otherwise({
redirectTo: "/";
});
});
이 그리고 내 /public/index.html에
나는
<html ng-App="myApp">
// All the angular script files including app.js
<body>
<div ng-view></div>
이하이있는 모든 내 HTML 파일은/public/views/
에 있습니다."얻을 수 없음/연락처"가 표시됩니다.
또는 인덱스가 아닌 웹 페이지.
어떤 도움이 필요합니까?
브라우저에서 URL '/ contactus'또는 URL '/ #/contactus'로 이동 하시겠습니까? 아마도 후자를 사용해야 할 것입니다. –
내 브라우저에서 /contusus에갑니다. – user7412522