9 lines
384 B
JavaScript
9 lines
384 B
JavaScript
|
import {kebabToCamel} from './string';
|
||
|
|
||
|
template.$inject = ['$element', '$attrs', 'vnInputAttrsNormalizer', 'vnResolveDefaultComponent'];
|
||
|
export default function template($element, $attrs, normalizer, resolve) {
|
||
|
normalizer.normalize($attrs);
|
||
|
let templateName = kebabToCamel($element[0].tagName.toLowerCase().substr(3));
|
||
|
return resolve.getTemplate(templateName, $attrs);
|
||
|
}
|