How to use the @glimmer/runtime.templateFactory function in @glimmer/runtime

To help you get started, we’ve selected a few @glimmer/runtime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github glimmerjs / glimmer.js / packages / @glimmer / component / src / component-layout-compiler.ts View on Github external
compile(builder: ComponentLayoutBuilder) {
    let env = builder.env;
    let factory = templateFactory(this.template);
    let layout = factory.create(env).asLayout();
    builder.fromLayout(layout);
    builder.attrs.static('class', 'glimmer-component');
    // TODO builder.attrs.dynamic('role', ariaRole);
  }
}
github glimmerjs / glimmer-vm / packages / @glimmer / test-helpers / lib / environment.ts View on Github external
compile(template: string, meta: TemplateMeta = {}): Template {
    let wrapper = JSON.parse(precompile(template, { meta }));
    let factory = templateFactory(wrapper);
    return factory.create(this.compileOptions);
  }
github glimmerjs / glimmer-vm / packages / @glimmer / test-helpers / lib / environment / lazy-env.ts View on Github external
compile(template: string, meta?: TemplateMeta): Template {
    let wrapper = JSON.parse(precompile(template));
    let factory = templateFactory(wrapper);
    return factory.create(this.compileOptions, (meta || {}) as any as TemplateMeta);
  }