Bypassing Sanitizing for trusted values

Download angular2 eBook

Parameters

ParamsDetails
selectortag name you reference your component by in the html
template(templateUrl)a string that represents html which will be inserted wherever the <selector> tag is. templateUrl is a path to an html file with the same behavior
pipesan array of pipes that are used by this component.

Remarks

SUPER IMPORTANT!

DISABLING SANITIZING LEAVES YOU AT RISK OF XSS (Cross-Site Scripting) AND OTHER ATTACK VECTORS. PLEASE MAKE SURE YOU TRUST WHAT YOU'RE GETTING 100%

Using Pipes relegates you to only changing attribute values like so :

<tag [attribute]="expression or variable reference | pipeName">

you are not able to use pipes this way :

<tag attribute="expression or variable reference | pipeName">

or this way

<tag attribute={{expression or variable reference | pipeName}}

Related Examples

Stats

59 Contributors: 1
Sunday, September 11, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook