Imitation of what the project, the development of product details page

Click commodities should jump to the product details page, where we make the product details page components

In the definition of internal components show a method for switching the display assembly

 

 Then give out food to add a click event, when clicked pass data to show sub-assemblies in the method calls itself subassembly

Top goods component called a data selected commodities

 

Add a click event to the data, and pass into the food

 

 

 Define the click event method, and the value assigned to the variable selectedfood just defined, then call the show method subcomponents (by ref)

 

Data transfer:

 

 

Guess you like

Origin www.cnblogs.com/rmty/p/11502260.html