How to use the @aurelia/jit-html.AttrBindingCommand function in @aurelia/jit-html

To help you get started, we’ve selected a few @aurelia/jit-html 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 / __tests__ / i18n / t / translation-render.spec.ts View on Github external
it('compiles the binding to a TranslationBindBindingInstruction', function () {
    const [sut] = setup();
    const syntax: AttrSyntax = { command: 't.bind', rawName: 't.bind', rawValue: 'obj.key', target: 'bind' };

    const actual = sut.compile({
      command: new AttrBindingCommand(),
      flags: (void 0)!,
      expression: { syntax } as unknown as AnyBindingExpression,
      syntax
    });

    assert.instanceOf(actual, TranslationBindBindingInstruction);
  });
});
github aurelia / aurelia / packages / __tests__ / i18n / t / translation-parameters-render.spec.ts View on Github external
it('compiles the binding to a TranslationParametersBindingInstruction', function () {
    const sut = setup();
    const syntax: AttrSyntax = { command: 't-params.bind', rawName: 't-params.bind', rawValue: '{foo: "bar"}', target: '' };
    const plainAttributesymbol: PlainAttributeSymbol = {
      command: new AttrBindingCommand(),
      flags: (void 0)!,
      expression: { syntax } as unknown as AnyBindingExpression,
      syntax
    };

    const actual = sut.compile(plainAttributesymbol);

    assert.instanceOf(actual, TranslationParametersBindingInstruction);
  });
});

@aurelia/jit-html

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/) [![TypeScript](https://img.shields.io/badge/%3C%2F

MIT
Latest version published 4 years ago

Package Health Score

64 / 100
Full package analysis