0
Ich habe die neueste Version von Aurelia, obwohl ich glaube, dass es im vergangenen Jahr behoben wurde (https://github.com/aurelia/framework/issues/35), ich habe immer noch Probleme. Hat jemand anderes dieses Problem?Aurelia Custom Element - Alles direkt danach ist von DOM entfernt
Benutzerdefinierte Element:
<template>
<i class="fa fa-question fa-sm"></i>
</template>
import {customElement, bindable, inject, bindingMode} from 'aurelia-framework';
@customElement('tooltiphelper')
@bindable({name: 'title', attribute: 'title', defaultValue: 'Helper text', defaultBindingMode: bindingMode.twoWay})
@inject(Element)
export class ToolTipHelper {
constructor(element) {
this.element = element;
}
bind()
{
$(this.element).tooltip({ title: this.title, placement: 'right' });
}
}
Platz verwiesen:
<template>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="control-label">Name</label>
<tooltiphelper title.bind="'Do you work?'" />
<input disabled.bind="readonly" type="text" class="form-control" value.bind="baseContent.Name">
</div>
</div>
</div>
</template>
HTML generiert: Wo ist der Eingang gegangen?