templateView: Respond with a rendered template

Description Usage Arguments Value Examples

Description

Respond with a rendered template

Usage

1
templateView(templateFile, data)

Arguments

templateFile

Filepath of a whisker template

data

named list or environment with variables that will be used during rendering

Value

A response object with as body the rendered template.

Examples

1
2
templateView(system.file("static", "index.html", package = "mattR"),
             list(title = "foo", text = "bar"))

bobjansen/mattR documentation built on May 9, 2019, 9:57 p.m.