Skip to content

Native classes controllers not working #228

@rumkin

Description

@rumkin

There is an issue with native class controllers in Chrome. Controller like this:

alight.ctrl.test = class {
    constructor() {;
        this.value = 1;
    }
};

and html like this:

<div al-ctrl="test"></div>

could not be initialised due to new error:

Error in controller: test Class constructor  cannot be invoked without 'new' Object {name: "test", env: Object, scope: d, element: div} TypeError: Class constructor  cannot be invoked without 'new'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions