Create a list of dynamically generated content

Create a list of dynamically generated content
0

Hi all !!

I’m learning the basics and I’m on the subject (Create a list of dynamically generated content).

but the Label or the images are not published.

I am aware that it is level (hello world) but must start.

my work !!!

ItemList.js

ItemTemplate.js

forum2

ItemList

forum3

ItemTemplate

forum4

assets

forum5

Label Name Stock Price

Canvas
forum9

the problem comes from init, I think

Blockquote

        // line (41) ItemList.js

            item.getComponent('ItemTemplate').init({

                id: data.id,
                iconSF: data.iconSF,
                itemName: data.itemName,
                itemStock: data.itemStock,
                itemPrice: data.itemPrice
           
            
        }

        // line (16) ItemTemplate
     
            init: function (data) {

               this.id = data.id;
               this.icon.spriteFrame = data.iconSF;
               this.itemName.string = data.itemName;
               this.itemStock.string = data.itemStock;
               this.itemPrice.string = data.itemPrice
     
         },

I’m on the page https://docs.cocos.com/creator/manual/en/ui/list-with-data.html

the Prefab is displayed. the LabelName does not become ItemName, same for price, stock .

Thank you in advance for your reply