Hi flks I really hope u can help me 
first my Code looks like: 
```
import {Component, Input, ElementRef} from '@angular/core';
import {DomSanitizationService, SafeHtml, SafeScript} from 
"@angular/platform-browser";


@Component({
    selector: 'ajax-container',
    template: `
            <p>Me esta Ajax-Container Loader</p>
            
            
            <div></div>
            <div [innerHTML]="riskyCode"></div>
           
            `,
    directives: [
        AjaxContainerComponent,

    ]
})
export class AjaxContainerComponent {
    @Input() input: any;
    @Input() id: string;
    @Input() htmlCode: string = `<button onclick="huha();">do it</button>`;
    scriptCode: string = `<script type="text/javascript"> function huha() 
{alert('Me esta Evil')}</script>`;
    riskyCode: SafeHtml;
    dangerousCode: SafeScript;
    ;
    elementRef: ElementRef;

    constructor(private sanitize: DomSanitizationService) {
        

        this.riskyCode = sanitize.bypassSecurityTrustHtml(this.htmlCode);
        this.dangerousCode = 
sanitize.bypassSecurityTrustScript(this.scriptCode);
        

    }
}
```
and i want do use an Script Created dynamically so i tried to use the 
Safescript Objekt . I get it Created but i want do get it working and i 
have no idea how

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to