Last active
January 4, 2021 15:09
-
-
Save johnpapa/dd9b8a06bf93f4b38a3e to your computer and use it in GitHub Desktop.
Getting Started Super Fast - Angular 2 CDN'd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm init –y | |
npm i angular2 systemjs --save --save-exact | |
npm i typescript tsd live-server --save-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Getting Started</title> | |
<script src="https://code.angularjs.org/tools/system.js"></script> | |
<script src="https://code.angularjs.org/tools/typescript.js"></script> | |
<script src="https://code.angularjs.org/2.0.0-alpha.39/angular2.dev.js"></script> | |
<script> | |
System.config({ | |
transpiler: 'typescript', | |
typescriptOptions: { emitDecoratorMetadata: true } | |
}); | |
System.import('./app.ts'); | |
</script> | |
</head> | |
<body> | |
<my-app>loading...</my-app> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does this transpile TypeScript to JavaScript in the browser rather than locally?
I'd rather not rely on the local node_modules scripts as shown in the 5 min quickstart https://angular.io/docs/ts/latest/quickstart.html:
Thank you!