Use Scala Templates from Play! framework in scala.js

Templates from the game! The framework is compiled into Scala and seems to be suitable for the scala.js project, which is used for client-side templates. How difficult is it to use them in a scala.js project? As I am very new to both Scala and for sbt, detailed instructions will be highly appreciated.

Alternatively, is there another template engine that is better suited for use with scala.js?

+3
source share
2 answers

I do not think that it will be possible to use Play! Templates in Scala.js for now. The problem is that Play! templates apply to Play! libraries including

import play.templates._
import play.templates.TemplateMagic._
import play.api.templates._
import play.api.templates.PlayMagic._
import play.api.i18n._
import play.api.mvc._
import play.api.data._

JVM, , Scala.js .

HTML Scala.js, ScalaTags. , , , .

+2

.

+1

All Articles