angular-cn/public/docs/_examples/security/ts/app/inner-html-binding.component.ts
Patrice Chalin 705d8c50fd docs(security): proofread prose, app now shows good and bad
- App now shows how Angular handles untrusted URLs and resources
- E2e test covered new functionality
- Copyedits to prose
- Updated provider expressions to use latest syntax

The original security feature tracker:
https://github.com/angular/angular/issues/8511
2016-06-30 13:04:55 -07:00

14 lines
391 B
TypeScript

// #docregion
import { Component } from '@angular/core';
@Component({
moduleId: module.id,
selector: 'inner-html-binding',
templateUrl: 'inner-html-binding.component.html',
})
// #docregion inner-html-controller
export class InnerHtmlBindingComponent {
// E.g. a user/attacker controlled value from a URL.
htmlSnippet = 'Template <script>alert("0wned")</script> <b>Syntax</b>';
}