Last active
August 10, 2017 13:52
-
-
Save SwarnaKishore/4f670595b8c3e870c21e2c007b72ed72 to your computer and use it in GitHub Desktop.
Safe pipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'my-app', | |
template: ` | |
<div [innerHtml]="htmlSnippet"></div> | |
`, | |
}) | |
export class App { | |
htmlSnippet: string = "<script>maliciousCode()</script>"; | |
constructor() {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment