ChangeDetectionError

export class ChangeDetectionError

exported from angular2/core defined in angular2/src/core/change_detection/exceptions.ts (line 41)

Thrown when an expression evaluation raises an exception.

This error wraps the original exception to attach additional contextual information that can be useful for debugging.

Example (live demo)

@Directive({selector: 'child', inputs: ['prop']}) class Child { prop; } @Component({ selector: 'app', template: ` <child [prop]="field.first"></child> `, directives: [Child] }) class App { field = null; } bootstrap(App);

You can access the original exception and stack through the originalException and originalStack properties.

Constructor

constructor(exp: string, originalException: any, originalStack: any, context: any)

Not Yet Documented

Members

location : string

Information about the expression that triggered the exception.