CONST_EXPR in Angular2 RC.0

I used CONST_EXPR in beta through;

import {CONST_EXPR} from 'angular/src/facade/lang'; 

But this does not work with Angular2 RC.0, is there a way to import it somewhere or is there a viable replacement. I used it to integrate with ngModel in my source components to create a value attribute, for example.

 const INPUTSWITCH_VALUE_ACCESSOR: Provider = CONST_EXPR( new Provider(NG_VALUE_ACCESSOR, { useExisting: forwardRef(() => InputSwitch), multi: true })); 
+5
source share
1 answer

I think CONST_EXPR was just a wrapper for the required const translation for ts2dart . It seems they recently got rid of this. There is no need to do this constant in TypeScript.

See also https://github.com/angular/angular/pull/8227/files

+7
source

All Articles