scala - 如何在 Twirl 模板中使用 play-bootstrap
问题描述
我是一个游戏新手,我很难弄清楚我需要哪些导入以及将它们放在哪里以便使用play-bootstrap。我已将库添加为依赖项("com.adrianhurt" %% "play-bootstrap" % "1.5.1-P27-B4"
),然后在我的模板中,我尝试使用:
@b4.vertical.form(routes.AccountController.handleSubscriptionForm) { implicit vfc =>
@helper.CSRF.formField
@b4.email(form("email"))
// ...and so on
}
但是模板无法编译并出现奇怪的错误消息:
Expected '"' but found 'EOF'
我确定我需要以某种方式导入@b4
模板上下文,但我不明白如何。
PS。我可以毫无问题地使用“标准”播放助手,以下工作完美:
@helper.form(routes.AccountController.handleSubscriptionForm) {
@helper.CSRF.formField
@helper.inputText(form("email"))
为了使用 play bootstrap 助手,我必须做什么?
解决方案
推荐阅读
- javascript - 如何使按钮默认处于活动状态?
- node.js - 如何使用循环存储多个旅行者信息?
- html - 复选框标签的可点击链接
- javascript - React.js joi-browser 根据数据库进行验证
- java - 在Java中绘制矩形时如何防止刷新
- django - Wagtail 内部链接网址无法正常工作
- anylogic - 为什么 AnyLogic 在构建时不显示错误但在运行时显示错误
- ios - 推荐哪种方式使用guard let?
- nestjs - 如何获取nestjs softremoved 产品
- python - Pandas 返回:ValueError: Unknown label type: 'continuous'