KnockoutJS: passing parameters to components

HTML

<my-component params='from: "foo"'></my-component>

JS

class MyViewModel {
    constructor(params) {
        console.log(params["from"]);
    }
}

ko.components.register('table-edit', {
    template:
        ``,

    viewModel: {
        createViewModel(params) {
            return new TableViewModel(params);
        },
    }
});