ember-cli-htmlbars
- Version 6.3.0
- Published
- 51.1 kB
- 14 dependencies
- MIT license
Install
npm i ember-cli-htmlbars
yarn add ember-cli-htmlbars
pnpm add ember-cli-htmlbars
Overview
A library for adding htmlbars to ember CLI
Index
Variables
variable Data
const Data: Symbol;
Functions
function hbs
hbs: { (template: string, options?: PrecompileOptions): TemplateFactory; (tagged: TemplateStringsArray): TemplateFactory;};
A helper for rendering components.
Parameter tagged
The template to render.
## Usage
### With tagged template
import { module, test } from 'qunit';import { setupRenderingTest } from 'ember-qunit';import { render } from '@ember/test-helpers';import { hbs } from 'ember-cli-htmlbars';module('demonstrate hbs usage', function(hooks) {setupRenderingTest(hooks);test('you can render things', function(assert) {await render(hbs`<TestingComponents @isCool={{true}} />`);assert.ok(true);});});## With string and options
import Component from '@glimmer/component';import { setComponentTemplate } from '@ember/component';import { hbs } from 'ember-cli-htmlbars';class Hello extends Component {greeting = 'hello world';}setComponentTemplate(hbs('<p>{{this.greeting}}</p>', { moduleName: 'hello.hbs' }),MyComponent);
Classes
class TemplateFactory
class TemplateFactory {}
The result of calling
hbs()
: an internal type for Ember to use with other framework-level APIs (public and private) likesetComponentTemplate()
.This type is *not* user-constructible; it is only legal to get it from
hbs
.
Interfaces
interface PrecompileOptions
interface PrecompileOptions {}
property moduleName
moduleName?: string;
property parseOptions
parseOptions?: { srcName?: string;};
Package Files (1)
Dependencies (14)
Dev Dependencies (51)
- @babel/core
- @babel/plugin-proposal-class-properties
- @babel/plugin-proposal-decorators
- @babel/plugin-transform-runtime
- @babel/plugin-transform-typescript
- @babel/runtime
- @ember/optional-features
- @ember/test-helpers
- @embroider/test-setup
- babel-eslint
- babel-plugin-debug-macros
- broccoli-merge-trees
- broccoli-test-helper
- chai
- co
- common-tags
- console-ui
- core-object
- ember-auto-import
- ember-cli
- ember-cli-app-version
- ember-cli-babel
- ember-cli-dependency-checker
- ember-cli-inject-live-reload
- ember-export-application-global
- ember-load-initializers
- ember-maybe-import-regenerator
- ember-qunit
- ember-resolver
- ember-source
- ember-source-channel-url
- ember-styleguide
- ember-template-lint
- ember-try
- eslint
- eslint-config-prettier
- eslint-plugin-ember
- eslint-plugin-mocha
- eslint-plugin-node
- eslint-plugin-prettier
- eslint-plugin-qunit
- fixturify
- loader.js
- mocha
- module-name-inliner
- prettier
- qunit
- qunit-dom
- release-it
- release-it-lerna-changelog
- webpack
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/ember-cli-htmlbars
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/ember-cli-htmlbars)
- HTML<a href="https://www.jsdocs.io/package/ember-cli-htmlbars"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1923 ms. - Missing or incorrect documentation? Open an issue for this package.