2016-06-29 6 views
0

昨年修正されたとは思うが、私は最新のバージョンのAureliaを持っていますが、まだ問題があります。他の誰かがこの問題を抱えていますか?Aureliaカスタムエレメント - その直後のものはDOMから削除されました

カスタム要素:参照

<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' }); 
    } 
} 

場所:生成

<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:入力がなくなったのか?

enter image description here

enter image description here

答えて

0

CEは正常に閉鎖する必要があります。

<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?'"></tooltiphelper> 
      <input disabled.bind="readonly" type="text" class="form-control" value.bind="baseContent.Name"> 
     </div> 
    </div> 
</div> 
</template> 
関連する問題