1
我在使用scala編寫可重用代碼時遇到了問題。Java Play 2 - 在scala中作爲參數的函數
如果我有像
@helper.form(action = routes.Guides.addComment(category,title)) {
有沒有辦法用一個變量來代替它?
僞代碼
@(func : Function)
@helper.form(action = func) {
編輯:
哦....現在是有點明顯。函數本身應該返回一個字符串,所以我想我可以這樣說這樣的事情
@(func :String)
..
。
return ok (form.render(routes.Guides.test()))
測試現在
你可以解釋一下如何使用這個分頁? –
您能否在單獨的問題中提出這個問題? –