| Start | ||||||||
|---|---|---|---|---|---|---|---|---|
| Bypassing Sanitizing with pipes (for code re-use) Project is following the structure from the Angular2 Quickstart guide here (opens new window). main.ts This finds the index.html file in the root of the project, and builds off of that. app.component.ts This is the top level component that groups other components that are used. pipeUser.component.ts This component provides the view for the Pipe to work with. sanitize.pipe.ts This is the logic that describes what the pipe formats. index.html main.html pipe.html If you were to inspect the html while the app is running you would see that it looks like this: Parameters
RemarksSUPER 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 : you are not able to use pipes this way : or this way |
Read Article
https://develop.horje.com/learn/1434/reference