How to use stringbuilder in angular2
<p>I am doing an angular2 application and there I have to use StringBuilder. So I have to know How to use the string builder and how to append to it.</p>

<pre><code>var sb = new StringBuilder();
var sResult = "";
$(arrayWidgets).each(function (index) {
    if (arrayWidgets[index] != "") {
        sb.append("&lt;div class='EachWidget FL'&gt;");
        sb.append("&lt;/div&gt;");
    }
});
</code></pre>

<p>This is the code in Javascript</p>

<p>StringBuilder Code</p>

<pre><code>var StringBuilder = function () { this.value = ""; };
StringBuilder.prototype.append = function (value) { this.value += value; };
StringBuilder.prototype.toString = function () { return this.value; };
</code></pre>