Template

com.alecdorrington.server.html.Template
object Template

A simple HTML template common to every page of this application. Loads the necessary style sheets and scripts. Different pages differ only in that a different view initialisation function is called. This is injected by name as a string, and the corresponding view is loaded from the client subproject.

Attributes

Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Template.type

Members list

Value members

Concrete methods

def apply(viewName: String, pageTitle: String = ..., hotReload: Boolean = ...): String

Value parameters

hotReload

Determines whether hot reload is enabled on the client, which allows the client to automatically restart when the server does.

pageTitle

The title of the page, which is displayed in the browser tab.

viewName

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

Attributes