Skip to content

Instantly share code, notes, and snippets.

@dhinojosa
Created August 31, 2022 02:41
Show Gist options
  • Save dhinojosa/0c2a075c67c8eecbffd537f10ed121a4 to your computer and use it in GitHub Desktop.
Save dhinojosa/0c2a075c67c8eecbffd537f10ed121a4 to your computer and use it in GitHub Desktop.
Sample of slide for question

Template Parameters

  • A template is like a function, so it needs parameters, which must be declared at the top of the template file

    @(customer: Customer, orders: List[Order])
  • Templates can also have default values in case one is not specified

    @(title: String = "Home")
  • You can also have parameter groups

  • This will be essential when applying implicit parameters

@(title: String)(body: Html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment