Passing variable to subview class

How can I passing variable to subview class?

// passing variable to SubView, try using constructor
body: SubView(false, 123)

subview:

constructor(isEdit, userId) {
    super();
    this.isEdit = isEdit;
    this.userId = userId;
}

config(){
    // display passing variable
    return { template:"test" + this.isEdit + " - " + this.userId};
}

https://snippet.webix.com/xl5vnt36

Tagged:

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!