I'm just wading into setting up an Angular2 app and I'm not sure what is the best way to configure the index.html. I have two examples to go from: a javascript version and a typescript version. Since Angular2 is using typescript I thought the typescript version makes sense. The javascript version is coming from the new Angular2 book from Ari Lerner. Here are the 2 examples:
Typescript configuration:
System.config({
transpiler: 'typescript',
typescriptOptions: {emitDecoratorMetadata: true},
packages: {app: {defaultExtension: 'ts'}}
});
System.import('app/app');
Javascript configuration:
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/app.js')
.then(null, console.error.bind(console));
My question is which one is the best to use, and why?
Typescriptyou may find it helpful