You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, runtime throws Uncaught TypeError: Cannot call a class as a function in _classCallCheck()
varComponent=(function(_Directive){functionComponent(){var_ref2=arguments[0]===undefined ? {} : arguments[0];varselector=_ref2.selector;varbind=_ref2.bind;varevents=_ref2.events;varservices=_ref2.services;varlifecycle=_ref2.lifecycle;_classCallCheck(this,Component);// <-- maybe is this the cause?_get(Object.getPrototypeOf(Component.prototype),'constructor',this).call(this,{selector: selector,bind: bind,events: events,lifecycle: lifecycle});this.services=services;}_inherits(Component,_Directive);returnComponent;})(Directive);
Is it correct that we use a class constructor as a decorator?
Thanks.
The text was updated successfully, but these errors were encountered:
In angular2.
https://github.com/angular/angular/blob/master/modules/angular2/src/core/annotations/annotations.js#L482
Component
is defined as a class. In my codeapp.es6
in the following, theComponent
constructor is used as a decorator.However, runtime throws
Uncaught TypeError: Cannot call a class as a function
in_classCallCheck()
Is it correct that we use a class constructor as a decorator?
Thanks.
The text was updated successfully, but these errors were encountered: