requirejs-我没有得到加载和;要求;未调用的函数
在我的简单索引文件中,我添加了“requirejs”-并调用define函数,但没有得到任何响应: Html:requirejs-我没有得到加载和;要求;未调用的函数,requirejs,Requirejs,在我的简单索引文件中,我添加了“requirejs”-并调用define函数,但没有得到任何响应: Html: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <script data-main="js/main" s
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script data-main="js/main" src="js/lib/require.js"></script>
</body>
</html>
我找到了一个解决方案:它描述为:
require(["helper/util"], function(util) {
//This function is called when scripts/helper/util.js is loaded.
//If util.js calls define(), then this function is not fired until
//util's dependencies have loaded, and the util argument will hold
//the module value for "helper/util".
});
在这里:
谢谢大家
require(["helper/util"], function(util) {
//This function is called when scripts/helper/util.js is loaded.
//If util.js calls define(), then this function is not fired until
//util's dependencies have loaded, and the util argument will hold
//the module value for "helper/util".
});