TestComponent

Undocumented in source.
version(unittest)
class TestComponent : HbsComponent!(tplComponent) {}

Members

Manifest constants

ComponentName
enum ComponentName;

Variables

a
int a;
Undocumented in source.
b
int b;
Undocumented in source.

Examples

Rendering component with external template at runtime

struct Controller {
  int a = 1;
  int b = 2;
}

enum tpl = `{{test-component a=a b=b}}`;
render!(Controller, TestComponent)(tpl, Controller()).should.equal("1:2");

Rendering component with external template at ctfe

struct Controller {
  int a = 1;
  int b = 2;
}

enum tpl = `{{test-component a=a b=b}}`;
render!(tpl, Controller, TestComponent)(Controller()).should.equal("1:2");

Meta