Security

Developing for content security in Angular applications This section describes Angular's built-in protections against common web application vulnerabilities and attacks such as cross-site scripting attacks. It does not cover application-level security, such as authentication (Who is this user?) or authorization (What can this user do?). For more information about the attacks and mitigations described below, see OWASP Guide Project. Contents: Reporting vulnerabilities. Best practices. Prevent

SchemaMetadata

Experimental Interface Interface Overview interface SchemaMetadata { name : string } Interface Description Interface for schema definitions in @NgModules. Interface Details name : string exported from @angular/core/index, defined in @angular/core/src/metadata/ng_module.ts

Sanitizer

Stable Class Class Overview class Sanitizer { sanitize(context: SecurityContext, value: string) : string } Class Description Sanitizer is used by the views to sanitize potentially dangerous values. Class Details sanitize(context: SecurityContext, value: string) : string exported from @angular/core/index, defined in @angular/core/src/security.ts

SafeUrl

Stable Interface Interface Overview interface SafeUrl { } Interface Description Marker interface for a value that's safe to use as a URL linking to a document. exported from @angular/platform-browser/index, defined in @angular/platform-browser/src/security/dom_sanitization_service.ts

SafeStyle

Stable Interface Interface Overview interface SafeStyle { } Interface Description Marker interface for a value that's safe to use as style (CSS). exported from @angular/platform-browser/index, defined in @angular/platform-browser/src/security/dom_sanitization_service.ts

SafeScript

Stable Interface Interface Overview interface SafeScript { } Interface Description Marker interface for a value that's safe to use as JavaScript. exported from @angular/platform-browser/index, defined in @angular/platform-browser/src/security/dom_sanitization_service.ts

SafeResourceUrl

Stable Interface Interface Overview interface SafeResourceUrl { } Interface Description Marker interface for a value that's safe to use as a URL to load executable code from. exported from @angular/platform-browser/index, defined in @angular/platform-browser/src/security/dom_sanitization_service.ts

SafeHtml

Stable Interface Interface Overview interface SafeHtml { } Interface Description Marker interface for a value that's safe to use as HTML. exported from @angular/platform-browser/index, defined in @angular/platform-browser/src/security/dom_sanitization_service.ts

Routing & Navigation

Discover the basics of screen navigation with the Angular 2 Router. The Angular Router enables navigation from one view to the next as users perform application tasks. We cover the router's primary features in this chapter, illustrating them through the evolution of a small application that we can run live. To see the URL changes in the browser address bar, pop out the preview window by clicking the blue 'X' button in the upper right corner. Overview The browser is a familiar model of applica

RoutesRecognized

Stable Class What it does Represents an event triggered when routes are recognized. Class Overview class RoutesRecognized { constructor(id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot) id : number url : string urlAfterRedirects : string state : RouterStateSnapshot toString() : string } Class Description Constructor constructor(id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot) Class Details id : number url :