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

Please check
https://snippet.webix.com/n789t4mm

  • add “new” when constructing new class instance
  • you need to provide the app instance as first parameter of super call at line 7

Also, while usage of class instances in your case ( windows ) has sense, in common case the same effect can be achieved by using URL parameter ( getParam can be used to read parameter from any of parent views )

https://snippet.webix.com/2pqzt4ct

Thanks @maksim Jet make easy
yes actually I can passing by url shared object on model,

I just wanna try direct into constructor to popup window