Does anyone understand this snippet? - adding child to gridlayout dynamically


#1

I am trying to add components into a gridlayout.

At the moment I am following http://www.nativescriptsnacks.com/snippets/2016/06/20/child-components-gridlayout.html

But it doesnt explain if I should be adding the child like this:

const factory = this.componentFactoryResolver.resolveComponentFactory(ProductButtonComponent);
const ref = this.gridcontainer.createComponent(factory);

Or I need to do in a different way?

Any help would be cool


#2

Anyone be able to help me here?


#3

Was Don Burgess able to help here?