-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi,
I tried using this in an application targeted for ES5 and it throws an error
@Injectable()
export class FileUploadStoreService extends ComponentStore {
private canceller: Subject = new Subject();
constructor(@Inject(FILE_UPLOAD_SERVICE) private uploadService: IFileUploadService) {
// initial state
super(INITIAL_BUNDLE_STATE); <============ Fails here since super refers to an ES6 class.
}
core.js:7376 ERROR Error: Uncaught (in promise): TypeError: Class constructor ComponentStore cannot be invoked without 'new'
TypeError: Class constructor ComponentStore cannot be invoked without 'new'
at new FileUploadStoreService (libs-file-upload.js:154)
at createClass (core.js:21827)
at _createProviderInstance$1 (core.js:21812)
at createProviderInstance (core.js:21689)
at createViewNodes (core.js:29868)
at callViewAction (core.js:30197)
at execComponentViewsAction (core.js:30116)
at createViewNodes (core.js:29909)
at createRootView (core.js:29795)
at callWithDebugContext (core.js:30803)
at resolvePromise (zone.js:852)
at resolvePromise (zone.js:809)
at zone.js:913
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
When I change the target of my application to ES6, it works nicely. Is this by design?