Angular2 dynamically insert script tag
<p>I'm getting from server content into json object field, where it is html, <code>&lt;style&gt;&lt;/style&gt;</code> and <code>&lt;script&gt;&lt;/script&gt;</code> tags, and I want to execute it like this:</p>

<p>[innerHtml]="content | sanitize", but <code>&lt;script&gt;&lt;/script&gt;</code> tags do not execute. Is it possible to make it work?</p>

<p>My sanitize pipe looks like this:</p>

<pre><code>import {Pipe} from '@angular/core';
import {DomSanitizationService} from '@angular/platform-browser';

@Pipe({
    name: 'sanitize',
    pure: true
})
export class Sanitize {
    constructor(private sanitizer: DomSanitizationService) {

    }

    transform(html: string) {

        return this.sanitizer.bypassSecurityTrustHtml(html);
    }
}
</code></pre>

<p>I know, that there is bypassSecurityTrustScript function in DomSanitizationService, but how can I use it in my case?</p>