2017-07-06 11 views
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> 

以下は抜粋です。

答えて

0

は、私はエラーを取り除くために、次の構文を使用する必要が

<link rel="stylesheet" type="text/css" href='@routes.Assets.versioned("stylesheets/Content/bootstrap.css")' 
関連する問題