Sha256: 51e8ba024c2b929fc0afa1533723c4143b9a986278295cf1e57b512b9fc3818c
Contents?: true
Size: 968 Bytes
Versions: 2
Compression:
Stored size: 968 Bytes
Contents
import { EMBER_GLIMMER_ANGLE_BRACKET_INVOCATION } from '@ember/canary-features'; import { assert } from '@ember/debug'; import { Object as EmberObject } from 'ember-runtime'; export default EmberObject.extend({ componentFor(name, owner, options) { assert( `You cannot use '${name}' as a component name. Component names must contain a hyphen${ EMBER_GLIMMER_ANGLE_BRACKET_INVOCATION ? ' or start with a capital letter' : '' }.`, name.indexOf('-') > -1 || EMBER_GLIMMER_ANGLE_BRACKET_INVOCATION ); let fullName = `component:${name}`; return owner.factoryFor(fullName, options); }, layoutFor(name, owner, options) { assert( `You cannot use '${name}' as a component name. Component names must contain a hyphen.`, name.indexOf('-') > -1 || EMBER_GLIMMER_ANGLE_BRACKET_INVOCATION ); let templateFullName = `template:components/${name}`; return owner.lookup(templateFullName, options); }, });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
discourse-ember-source-3.5.1.1 | dist/es/ember-views/lib/component_lookup.js |
discourse-ember-source-3.5.1.0 | dist/dist/es/ember-views/lib/component_lookup.js |