Let's start creating the configurator
- Create a copy of the file "templateConfigurator.ts" which can be found in buerli-examples in models/solid folder
- In the create method we first copy the whole code we implemented in the create method of My first model
This will first do nothing more than run through the code we've already implemented. And as a result, you will, of course, see the same.
The next step will be to create the parameters to set for the rows and columns. There is already a definition for parameters in the template. Add two number parameters to it, one for the number of rows and one for the number of columns.
Start the application again and see how the parameters have been added to your example. If everthings done right, it should look something like that:
Updating one of these number parameters will automatically call the update method of the example. So all we need to do, is to call the initial create method with the updated parameters. Don't forget to replace the hard coded initial values for rows and columns with the incoming parameters. Each time we change the value, the model will be recreated. The update method will look like this: