How to use the @aurelia/runtime.HydrateTemplateController function in @aurelia/runtime

To help you get started, we’ve selected a few @aurelia/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 aurelia / aurelia / packages / testing / src / au-dom.ts View on Github external
createElseInstruction(def: PartialCustomElementDefinition): HydrateTemplateController {
    return new HydrateTemplateController(def, 'else', [], true);
  },
  createRepeatInstruction(expression: string, def: PartialCustomElementDefinition): HydrateTemplateController {
github aurelia / aurelia / test / kitchen-sink / src / app.ts View on Github external
[
        createElement(dom, 'thead', {}, [
          createElement(dom, 'tr', {
            $1: new HydrateTemplateController({
              name: '',
              template: ' ',
              instructions: [[new TextBindingInstruction(`\${col | pascal}`)]],
              strategy
            },
            'repeat',
            [new IteratorBindingInstruction(this.keyedStrategy ? 'col of cols' : 'col of cols', 'items')]
            )
          })
        ]),
        createElement(dom, 'tbody', {
          $1: new HydrateTemplateController({
            name: '',
            template: '',
            instructions: [[new HydrateTemplateController({
              name: '',
              template: ' ',
              instructions: [[new TextBindingInstruction(`\${row[col]}`)]],
              strategy
            },
            'repeat',
            [new IteratorBindingInstruction(this.keyedStrategy ? 'col of cols' : 'col of cols', 'items')]
            )]]
          },
          'repeat',
          [new IteratorBindingInstruction(this.keyedStrategy ? 'row of rows' : 'row of rows', 'items')]
          )
        })
github aurelia / aurelia / packages / testing / dist / esnext / au-dom.js View on Github external
createIfInstruction(expression, def) {
        return new HydrateTemplateController(def, 'if', [new ToViewBindingInstruction(parseExpression(expression), 'value')]);
    },
    createElseInstruction(def) {
github aurelia / aurelia / packages / testing / dist / esnext / au-dom.js View on Github external
createReplaceableInstruction(def) {
        return new HydrateTemplateController(def, 'replaceable', []);
    },
    createWithInstruction(expression, def) {
github aurelia / aurelia / packages / testing / dist / umd / au-dom.js View on Github external
createReplaceableInstruction(def) {
            return new runtime_1.HydrateTemplateController(def, 'replaceable', []);
        },
        createWithInstruction(expression, def) {
github aurelia / aurelia / test / kitchen-sink / src / app.ts View on Github external
private createSubject(): void {
    let strategy: BindingStrategy;
    if (this.proxyStrategy) {
      strategy |= BindingStrategy.proxies;
    }
    const dom = this.$controller.context.get>(IDOM);
    this.subject = createElement(
      dom,
      'table',
      {
        class: 'table is-fullwidth',
      },
      [
        createElement(dom, 'thead', {}, [
          createElement(dom, 'tr', {
            $1: new HydrateTemplateController({
              name: '',
              template: ' ',
              instructions: [[new TextBindingInstruction(`\${col | pascal}`)]],
              strategy
            },
            'repeat',
            [new IteratorBindingInstruction(this.keyedStrategy ? 'col of cols' : 'col of cols', 'items')]
            )
          })
        ]),
        createElement(dom, 'tbody', {
          $1: new HydrateTemplateController({
            name: '',
            template: '',
            instructions: [[new HydrateTemplateController({
              name: '',
github aurelia / aurelia / packages / testing / src / au-dom.ts View on Github external
createReplaceableInstruction(def: ITemplateDefinition): HydrateTemplateController {
    return new HydrateTemplateController(def, 'replaceable', []);
  },
  createWithInstruction(expression: string, def: ITemplateDefinition): HydrateTemplateController {
github aurelia / aurelia / packages / jit-html / src / template-compiler.ts View on Github external
scopeParts,
      name: symbol.partName == null ? symbol.res : symbol.partName,
      template: symbol.physicalNode,
      instructions: controllerInstructions,
      build: buildNotRequired
    };

    let parts: Record | undefined = void 0;
    if ((symbol.flags & SymbolFlags.hasParts) > 0) {
      parts = {};
      for (const part of symbol.parts) {
        parts[part.name] = this.parts[part.name];
      }
    }

    this.instructionRows.push([new HydrateTemplateController(def, symbol.res, bindings, symbol.res === 'else', parts)]);
  }
github aurelia / aurelia / packages / jit-html / src / template-compiler.ts View on Github external
const def: ITemplateDefinition = {
      name: symbol.partName == null ? symbol.res : symbol.partName,
      template: symbol.physicalNode,
      instructions: controllerInstructions,
      build: buildNotRequired
    };

    let parts: Record | undefined = void 0;
    if ((symbol.flags & SymbolFlags.hasParts) > 0) {
      parts = {};
      for (const part of symbol.parts) {
        parts[part.name] = this.parts[part.name];
      }
    }

    this.instructionRows.push([new HydrateTemplateController(def, symbol.res, bindings, symbol.res === 'else', parts)]);
  }