0
이 코드에서 도움을 요청하고 싶습니다. 그렇지 않다면 PARAM의 어쩌려 구`t 작업 때문에, 왜,AngularJS 그렇지 않으면 작동하지 않습니다.
Error: No default engine was specified and no extension was provided.
: 나는 존재하지 않는 주소로 갈 때
app.config(function ($locationProvider, $routeProvider) {
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
$routeProvider
.when("/", {
templateUrl: "views/home.html",
controller: "HomeController"
}).when("/login", {
templateUrl: "/views/login.html",
controller: "LoginController"
}).when("/register", {
templateUrl: "/views/register.html",
controller: "RegisterController"
}).when("/users", {
templateUrl: "/views/admin/users.html",
controller: "UserController",
requiresAuth : true
}).otherwise({
redirectTo: "/"
});
}).run(function($rootScope, Session) {
$rootScope.$on("$routeChangeStart", function(event, next, current) {
if (next.requiresAuth && !Session.getIsAdmin()) {
alert("You are not authorized");
event.preventDefault();
}
});
});
그것은 잘못을 보여줍니다?
물론 가능합니다. 멍청한 실수. 모든 것은 괜찮습니다. 고맙습니다 – Kuba