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

Request

Experimental Class Class Overview class Request { constructor(requestOptions: RequestArgs) method : RequestMethod headers : Headers url : string withCredentials : boolean responseType : ResponseContentType detectContentType() : ContentType detectContentTypeFromBody() : ContentType getBody() : any } Class Description Creates Request instances from provided values. The Request's interface is inspired by the Request constructor defined in the Fetch Spec, but is conside

getDebugNode()

Experimental Function Class Export export getDebugNode(nativeNode: any) : DebugNode exported from @angular/core/index defined in @angular/core/src/debug/debug_node.ts

Validator

Stable Interface Interface Overview interface Validator { validate(c: AbstractControl) : {[key: string]: any} registerOnValidatorChange(fn: () => void) : void } Interface Description An interface that can be implemented by classes that can act as validators. Usage @Directive({ selector: '[custom-validator]', providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}] }) class CustomValidatorDirective implements Validator { validate(c: Control): {[

CompilerFactory

Experimental Class Class Overview class CompilerFactory { createCompiler(options?: CompilerOptions[]) : Compiler } Class Description A factory for creating a Compiler Class Details createCompiler(options?: CompilerOptions[]) : Compiler exported from @angular/core/index, defined in @angular/core/src/linker/compiler.ts

group()

Experimental Function Class Export export group(steps: AnimationMetadata[]) : AnimationGroupMetadata group is an animation-specific function that is designed to be used inside of Angular2's animation DSL language. If this information is new, please navigate to the component animations metadata page to gain a better understanding of how animations in Angular2 are used. group specifies a list of animation steps that are all run in parallel. Grouped animations are useful when a series of styles

Animations

A guide to Angular's animation system. Motion is an important aspect in the design of modern web applications. We want our user interfaces to have smooth transitions between states, and engaging animations that call attention where it's needed. Well-designed animations can make a UI not only more fun but also easier to use. Angular's animation system gives us what we need to make the kinds of animations we want. We can build animations that run with the same kind of native performance that we'r

FormControlName

Stable Directive What it does Syncs a FormControl in an existing FormGroup to a form control element by name. In other words, this directive ensures that any values written to the FormControl instance programmatically will be written to the DOM element (model -> view). Conversely, any values written to the DOM element through user input will be reflected in the FormControl instance (view -> model). How to use This directive is designed to be used with a parent FormGroupDirective (sel

CheckboxControlValueAccessor

Stable Directive Class Overview class CheckboxControlValueAccessor { constructor(_renderer: Renderer, _elementRef: ElementRef) onChange : (_: any) => {} onTouched : () => {} writeValue(value: any) : void registerOnChange(fn: (_: any) => {}) : void registerOnTouched(fn: () => {}) : void setDisabledState(isDisabled: boolean) : void } Selectors input[type=checkbox][formControlName] input[type=checkbox][formControl] input[type=checkbox][ngModel] Class Descript

DefaultValueAccessor

Stable Directive Class Overview class DefaultValueAccessor { constructor(_renderer: Renderer, _elementRef: ElementRef) onChange : (_: any) => {} onTouched : () => {} writeValue(value: any) : void registerOnChange(fn: (_: any) => void) : void registerOnTouched(fn: () => void) : void setDisabledState(isDisabled: boolean) : void } Selectors input:not([type=checkbox])[formControlName] textarea[formControlName] input:not([type=checkbox])[formControl] textarea[for