Problems encountered in the development of background management programs

problem: when adding a route dynamically, because all the data is obtained from the background, the component reference is a variable, but if you do the following, you will report an error, that is, you can"t find the module. It seems that require cannot reference a variable. I don"t know if there is any way to put a variable in require. That variable is the file address obtained from the database. The following figure is a logical

.

clipboard.png
red flag section. Will make mistakes, ask the boss to tell me the correct way


solved, it's your own problem


your r variable gets the path in front of .html, is to write less l

Menu