View
com.alecdorrington.client.views.View
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
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object IndexView
Members list
In this article