├── .gitignore ├── .vscode ├── launch.json └── tasks.json ├── README.MD ├── app ├── app.component.ts └── boot.ts ├── index.html ├── package.json └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | app/*.js 3 | app/*.map -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Launch", 6 | "type": "node", 7 | "request": "launch", 8 | "program": "${workspaceRoot}/node_modules/lite-server/bin/lite-server", 9 | "stopOnEntry": false, 10 | "args": [], 11 | "cwd": "${workspaceRoot}", 12 | "runtimeExecutable": null, 13 | "runtimeArgs": [], 14 | "env": { 15 | "NODE_ENV": "development" 16 | }, 17 | "console": "integratedTerminal", 18 | "sourceMaps": false 19 | }, 20 | { 21 | "name": "Attach", 22 | "type": "node", 23 | "request": "attach", 24 | "port": 5858 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | 4 | // The command is tsc. Assumes that tsc has been installed using npm install -g typescript 5 | "command": "tsc", 6 | 7 | // The command is a shell script 8 | "isShellCommand": true, 9 | 10 | // Always show output window. 11 | "showOutput": "always", 12 | 13 | // args is the HelloWorld program to compile. 14 | "args": [], 15 | 16 | // use the standard tsc problem matcher to find compile problems 17 | // in the output. 18 | "problemMatcher": "$tsc" 19 | } -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | This project contains the files necessary to run the Angular 2 Quick Start (TypeScript version) from within Visual Studio Code (VS Code). 2 | 3 | These VS Code configuration files have been added to support TypeScript compilation and running the application: 4 | 5 | * .vscode/launch.json - configuration required to start the lite-server module used to host the application when run through VS Code 6 | * .vscode/tasks.json - configuration required to run the TypeScript compiler in watch mode to re-compile .ts files on save -------------------------------------------------------------------------------- /app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from 'angular2/core'; 2 | 3 | @Component({ 4 | selector: 'app', 5 | template: '

{{getMessage()}}

' 6 | }) 7 | export class AppComponent { 8 | private message: string = "Hello World"; 9 | public getMessage(): string { 10 | return this.message; 11 | } 12 | } -------------------------------------------------------------------------------- /app/boot.ts: -------------------------------------------------------------------------------- 1 | import {bootstrap} from 'angular2/platform/browser' 2 | import {AppComponent} from './app.component' 3 | 4 | bootstrap(AppComponent); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Angular 2 QuickStart 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 25 | 26 | 27 | 28 | 29 | 30 | Loading... 31 | 32 | 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular2-quickstart", 3 | "version": "1.0.0", 4 | "scripts": {}, 5 | "license": "ISC", 6 | "dependencies": { 7 | "angular2": "2.0.0-beta.0", 8 | "es6-promise": "^3.0.2", 9 | "es6-shim": "^0.33.3", 10 | "reflect-metadata": "0.1.2", 11 | "rxjs": "5.0.0-beta.0", 12 | "systemjs": "0.19.6", 13 | "zone.js": "0.5.10" 14 | }, 15 | "devDependencies": { 16 | "lite-server": "^1.3.1", 17 | "typescript": "^2.1.4" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "system", 5 | "moduleResolution": "node", 6 | "sourceMap": true, 7 | "emitDecoratorMetadata": true, 8 | "experimentalDecorators": true, 9 | "removeComments": false, 10 | "noImplicitAny": false, 11 | "watch": true 12 | }, 13 | "exclude": [ 14 | "node_modules" 15 | ] 16 | } --------------------------------------------------------------------------------