com.alecdorrington.client.views

Members list

Type members

Experimental classlikes

object IndexView extends View

The view for the index page of the website, at URL /.

The view for the index page of the website, at URL /.

Attributes

Experimental
true
Supertypes
class View
class Object
trait Matchable
class Any
Self type
IndexView.type
abstract class View

Base class for all views, using Laminar. Each view corresponds to a distinct page (i.e. at a unique URL) of the website.

Base class for all views, using Laminar. Each view corresponds to a distinct page (i.e. at a unique URL) of the website.

Every view must be explicitly exported with JSExportTopLevel so that it appears in main.js and can be served to the user. For example:

import scala.scalajs.js.annotation.JSExportTopLevel

@JSExportTopLevel("IndexView")
object IndexView extends View:
 // ...

The appropriate view for each page is selected based on the name injected into the page template by the server.

Override content to specify the contents of the page. Reactive DOM elements can be imported with:

import com.raquo.laminar.api.L.{*, given}

Attributes

Experimental
true
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object IndexView