View

com.alecdorrington.pageloader.View
trait View

The base trait for all views. 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 the PageTemplate by the server.

Example
 import scala.scalajs.js.annotation.JSExportTopLevel
 @JSExportTopLevel("IndexView")
 object IndexView extends View:
   ???
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait LaminarView

Members list

Value members

Abstract methods

def show(rootName: String = ...): Unit

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 = ???