1.

What Is The Significance Of Index.html In Aurelia?

Answer»

index.html is deafult page of the app like in most of the HTML based apps. It is a place where scripts and stylesheets are loaded.It LOOKS as under

<!DOCTYPE html>
<html>
<head>
<TITLE>Aurelia</title>
</head>
<BODY aurelia‐app="src/main">
<script src="scripts/system.js"></script>
<script src="scripts/config‐typescript.js"></script>
<script src="scripts/aurelia‐core.min.js"></script>
<script>
System.import('aurelia‐bootstrapper');
</script>
</body>
</html>

We can also configure the programming language selection.Let's ADJUST our programming language. The default is pointing to TypeScript.

<script src="scripts/config‐typescript.js"></script>

HOWEVER, we will choose ESNext. So we need to change that to <script src="scripts/config‐esnext.js"></script> 

So our index.html will now look like

<!DOCTYPE html>
<html>
<head>
<title>Aurelia</title>
</head>
<body aurelia‐app="src/main">
<script src="scripts/system.js"></script>
<script src="scripts/config‐esnext.js"></script>
<script src="scripts/aurelia‐core.min.js"></script>
<script>
System.import('aurelia‐bootstrapper');
</script>
</body>
</html>

index.html is deafult page of the app like in most of the HTML based apps. It is a place where scripts and stylesheets are loaded.It looks as under

<!DOCTYPE html>
<html>
<head>
<title>Aurelia</title>
</head>
<body aurelia‐app="src/main">
<script src="scripts/system.js"></script>
<script src="scripts/config‐typescript.js"></script>
<script src="scripts/aurelia‐core.min.js"></script>
<script>
System.import('aurelia‐bootstrapper');
</script>
</body>
</html>

We can also configure the programming language selection.Let's adjust our programming language. The default is pointing to TypeScript.

<script src="scripts/config‐typescript.js"></script>

However, we will choose ESNext. So we need to change that to <script src="scripts/config‐esnext.js"></script> 

So our index.html will now look like

<!DOCTYPE html>
<html>
<head>
<title>Aurelia</title>
</head>
<body aurelia‐app="src/main">
<script src="scripts/system.js"></script>
<script src="scripts/config‐esnext.js"></script>
<script src="scripts/aurelia‐core.min.js"></script>
<script>
System.import('aurelia‐bootstrapper');
</script>
</body>
</html>



Discussion

No Comment Found