0
在視圖文件中添加反向路由導致錯誤。以下是摘錄:基於播放框架添加用於應用程序的css和js文件
@main(title = "index") {
<head>
<link rel="stylesheet" type="text/css" href='@routes.Assets.at("/Content/Site.css")' />
<script type="text/javascript" src='@routes.Assets.at("Scripts/bootstrap.js")'></script>
</head>
<body>
</body>
}
我已經加入了CSS和JS文件公用文件夾中
[error] C:\myproject\app\views\index.scala.html:5: value at is not a member of controllers.ReverseAssets
[error] <link rel="stylesheet" type="text/css" href='@routes.Assets.at("/Content/Site.css")' />
[error] ^
[error] C:\myproject\app\views\index1.scala.html:6: value at is not a member of controllers.ReverseAssets
[error] <script type="text/javascript" src='@routes.Assets.at("Scripts/bootstrap.js")'></script>
任何幫助表示讚賞。