1
각도와 레일을 사용하여 어플리케이션을 작성하고 있습니다.서브 링크를 가져 오려고 할 때 각도 + 레일스 앱이 전체 브라우저를 끊습니다.
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :intercept_html_requests
private
def intercept_html_requests
render('pages/index') if request.format == Mime::HTML
end
end
그리고 라우터와 같은 :
betly.config(function($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$routeProvider.when('/', {
templateUrl: 'assets/tournaments.html',
controller: 'tournamentController'
}).when('/aaa', {
templateUrl: 'assets/tournaments.html',
controller: 'tournamentController'
}).when('/matches/:matchId',{
templateUrl: 'assets/matchDetails.html',
controller: 'matchController'
}).otherwise({
redirectTo:'/'
});
});
views/layouts/application.html.erb
:
<!DOCTYPE html>
<html lang="en" ng-app>
<head>
<meta charset='utf-8' />
<title>BetLy</title>
<%= stylesheet_link_tag "application", media: "all" %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
<%= javascript_include_tag "application" %>
</body>
</html>
을 그리고 /matches/10
에 브라우저 무한 다운로드 자산을 이동하려고 해요 때 나는 내 ApplicationController
에서 폴백있다. 왜 그리고 어떻게 수정해야합니까?
내가 같은 문제가 발생하고 –