Last active
December 29, 2015 16:11
-
-
Save FlorianBELLAZOUZ/c474cf84463aebe9bc3a to your computer and use it in GitHub Desktop.
Basic bootstarp for Angular 2.0
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
| // app/app.ts | |
| import {bootstrap} from 'angular2/platform/browser'; | |
| import {Component} from 'angular2/core'; | |
| @Component({ | |
| selector:"app", | |
| template:"<h1>coucou</h1>" | |
| }) | |
| class TodoApp {} | |
| bootstrap(TodoApp); |
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>Todo</title> | |
| <meta charset="utf-8"> | |
| <script src="node_modules/angular2/bundles/angular2-polyfills.js"></script> | |
| <script src="node_modules/systemjs/dist/system.src.js"></script> | |
| <script src="node_modules/rxjs/bundles/Rx.js"></script> | |
| <script src="node_modules/angular2/bundles/angular2.dev.js"></script> | |
| <script> | |
| System.config({ | |
| packages: { | |
| app: { | |
| format: 'cjs', | |
| defaultExtension: 'js' | |
| } | |
| } | |
| }); | |
| System.import('app/app') | |
| .then(null, console.error.bind(console)); | |
| </script> | |
| </head> | |
| <body> | |
| <app></app> | |
| </body> | |
| </html> |
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
| { | |
| "name": "todo", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "start": "concurrent \"tsc -w\" \"lite-server\"" | |
| }, | |
| "author": "Florian BELLAZOUZ", | |
| "devDependencies": { | |
| "typescript": "^1.7.5", | |
| "concurrently": "^1.0.0", | |
| "lite-server": "^1.3.1" | |
| }, | |
| "dependencies": { | |
| "angular2": "^2.0.0-beta.0", | |
| "systemjs": "^0.19.9" | |
| } | |
| } |
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
| { | |
| "compilerOptions": { | |
| "target": "ES5", | |
| "module": "commonjs", | |
| "moduleResolution": "node", | |
| "sourceMap": true, | |
| "emitDecoratorMetadata": true, | |
| "experimentalDecorators": true, | |
| "removeComments": false | |
| }, | |
| "exclude": [ | |
| "node_modules" | |
| ] | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
npm installnpm start