Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class constructors must be invoked with |new| #159

Open
fstodulski opened this issue May 8, 2017 · 1 comment
Open

class constructors must be invoked with |new| #159

fstodulski opened this issue May 8, 2017 · 1 comment

Comments

@fstodulski
Copy link

fstodulski commented May 8, 2017

Hello.
I have a problem with my component's code.

I use this styleguid to build my app.
export const SidebarComponent = { templateUrl: '../app/components/common/sidebar/sidebar.component.html', controller: class SidebarComponentController { constructor() { } $onInit() { this.list = [] } } }

It works on Chrome and Safari but on Firefox it throws me an error:
class constructors must be invoked with |new|

I there any way to fix it ?

@hadicahyadi
Copy link

@Kamieniu just put this on the end of the controller class :
SidebarComponentController.$$ngIsClass = true;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants