javascript - Instructions modify the content of elements in angular4
世界只因有你
世界只因有你 2017-06-12 09:27:35
0
1
857
@Input('hqConversionCase') hqConversionCaseVal: string;
  @HostBinding() get innerHtml() {
    if (this.hqConversionCaseVal === "upper") {
      return this.innerHtml.toUpperCase();
    }
    if (this.hqConversionCaseVal === "lower") {
      return this.innerHtml.toLowerCase();
    }
  }

This is what I wrote. He always reported that the stack was exceeded. How can I modify the value of the element in the instruction?

世界只因有你
世界只因有你

reply all(1)
淡淡烟草味

return this.innerHtml always calls its own function, so this error will be reported.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template