mercredi 5 août 2020

Ember component constructor args is Proxy {}

In a fresh Ember 3.20 project (also same in 3.19), after adding a new component.

application.hbs:

<Test @foo="hello" />

components/test.js:

import Component from '@glimmer/component';

export default class TestComponent extends Component {
    constructor(){
        super(...arguments)
        console.log(this.args)
    }
}

Console: Proxy {}

How can I access this.args within the constructor?




Aucun commentaire:

Enregistrer un commentaire