com.alecdorrington.pageloader.laminar.LaminarView
The base trait for all views that use Laminar. Each view corresponds to a distinct page (i.e. at a unique URL) of the website.
Attributes
-
Note
-
Every View must be explicitly exported with @JSExportTopLevel.
The appropriate view for each page is selected based on the name injected into thePageTemplate by the server.
-
Example
-
import scala.scalajs.js.annotation.JSExportTopLevel
@JSExportTopLevel("IndexView")
object IndexView extends LaminarView:
???
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
Members list
The content of this page, constructed with Reactive DOM elements from Laminar.
The content of this page, constructed with Reactive DOM elements from Laminar.
Attributes
-
Note
-
Reactive DOM elements can be imported with:
import com.raquo.laminar.api.L.{*, given}
-
Example
-
override def content = div(
h1("Welcome to my website!"),
p("We're still getting set up here... Stay tuned!"),
)
Called only once upon initialisation when it is time to render this view.
Called only once upon initialisation when it is time to render this view.
Value parameters
-
rootName
-
The name (id) of the root HTML tag (default = "root"). The content of this view will be inserted there.
Attributes
-
Note
-
Every implementation of show must be explicitly exported with @JSExport.
-
Example
-
import scala.scalajs.js.annotation.JSExport
@JSExport("show")
override def show(rootName: String): Unit = ???
-
Definition Classes
-