Manikandan Thiagarajan
asked on
could you give me the hello world program for require.js
could you give me the hello world program for require.js
i want to understand he require.js
i want to understand he require.js
ASKER
require js concept hello world program
In your page you include the require script, and specify a main script file to load:
<!DOCTYPE html>
<html>
<head>
<title>My Sample Project</title>
<script data-main="main" src="scripts/require.js"></script>
</head>
<body>
<h1>My Sample Project</h1>
</body>
</html>
In your main.js file you load other scripts, for example a display.js file:require(["display"], function(util) {
sayHello('world');
});
The display.js file containing a function used in the main.js file:function sayHello(name) {
alert('Hello ' + name);
}
ASKER
cold you please give me the main.js file
ASKER
i am the new to the require.js
give me the full helloworld program to understand the require.js
and also specify the advantage
give me the full helloworld program to understand the require.js
and also specify the advantage
ASKER
can u zip it and send the file
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
document.write("Hello World")
HTH,
Kent