1.

How To Define Entry Point For Require Js?

Answer»

We need to DEFINE an html FILE and it could be "index.html" where Require JS is LOADING i.e.

<!DOCTYPE html>

<html>

<head>

<SCRIPT data-main="libs/main" src="libs/require.js"></script>

</head>

<body>

<h1> Require JS Sample APPS</h1>

</body>

</html>

In above example, the data-main attribute of require.js will start initialization of files.

We need to define an html file and it could be "index.html" where Require JS is loading i.e.

<!DOCTYPE html>

<html>

<head>

<script data-main="libs/main" src="libs/require.js"></script>

</head>

<body>

<h1> Require JS Sample apps</h1>

</body>

</html>

In above example, the data-main attribute of require.js will start initialization of files.



Discussion

No Comment Found