AngularJS Expression breaks with StencilJS

Viewed 416

I have a custom select web component created with StencilJS and I am using it in AngularJS like this:

<my-select>
  <my-option ng-repeat="item in items">
    {{item.value}}
  </my-option>
</my-select>

The problem is that whenever I push a new item on the items array (items.push({key: 'some', value: 'Some Value'})), the expression seems to print also it's own syntax in the DOM like this:

enter image description here

This is the <my-option> StencilJS component structure:

render() {
  return (
    <div class="option-container" onClick={this.selectOption(this)}>
      <slot />
    </div>
  );
}

Any help would be so much appreciated. Thank you.

1 Answers

Did you tried some newer Browser like the newest Firefox or Chrome? I faced some really stupid issues because Edge Browser for example does render the <slot tag as an String initially and just renders the innerHTML once. The other Browser will keep the slot as an DOM Element so its more dynamic.

Related