com.alecdorrington.pageloader

Members list

Type members

Classlikes

object HotReload

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
HotReload.type
object PageTemplate

A simple HTML template common to every page of an application.

A simple HTML template common to every page of an application.

Attributes

Note

Different pages differ only in that a different view initialisation function is called. This is injected by name as a string.

Supertypes
class Object
trait Matchable
class Any
Self type
trait View

The base trait for all views. Each view corresponds to a distinct page (i.e. at a unique URL) of the website.

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:
   ???
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait LaminarView
case class ViewData(name: String, iconPath: String = ..., pageTitle: String = ..., languageCode: String = ..., charset: String = ...)

Metadata for a View.

Metadata for a View.

Value parameters

charset

The character encoding declared in the <META charset> tag.

iconPath

The URL path to the page favicon.

languageCode

The BCP 47 language code for the lang attribute of the <HTML> tag.

name

The name of the view. Include only the name, with no package prefix and no parentheses (e.g. IndexView). In order to be visible to the client, a view must be exported using the @JSExportTopLevel annotation, and the name used in that annotation must match the name specified here.

pageTitle

The title of the page.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all