I was using CONST_EXPR in beta releases via;
import {CONST_EXPR} from 'angular/src/facade/lang';
But this is not working with Angular2 RC.0, is there way to import it from somewhere or is there a viable replacement. I was using it to integrate with ngModel in my input components to create a value accessor e.g.
const INPUTSWITCH_VALUE_ACCESSOR: Provider = CONST_EXPR(
new Provider(NG_VALUE_ACCESSOR, {
useExisting: forwardRef(() => InputSwitch),
multi: true
}));
I think CONST_EXPR
was just a wrapper for required translation of const
for ts2dart
. It seems they got rid of this recently. There is no need to make this const in TypeScript.
See also https://github.com/angular/angular/pull/8227/files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With