├── .gitignore ├── README.md ├── app └── ts │ ├── app.component.ts │ └── main.ts ├── index.html ├── package.json ├── tsconfig.json └── typings.json /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | typings 3 | node_modules 4 | app/js/* 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](http://i.imgur.com/CqXcsZ9.png) 2 | 3 | This is a base template for Angular 2. It contains the core files you will need when starting an Angular 2 project. 4 | To get started, follow the instructions below. 5 | 6 | ### Install Node.js and npm 7 | 8 | Download the latest version of Node.js if you do not already have it installed on your machine. This download will also 9 | include the latest version of npm. 10 | 11 | https://nodejs.org/en/download/ 12 | 13 | ### Download this Repository 14 | 15 | Clone this repo into a new project folder. You may also download it as a ZIP file. 16 | 17 | https://github.com/buckyroberts/angular-2-template.git 18 | 19 | ### Install Libraries and Dependencies 20 | 21 | Once you have the files downloaded, navigate into the root project directory and run the following command. This will 22 | install all libraries and dependencies. 23 | 24 | `npm install` 25 | 26 | ### Run the Project 27 | 28 | Now you can start the TypeScript compiler in watch mode and run lite-server with automatic refreshing. 29 | 30 | `npm start` 31 | 32 | *** 33 | 34 | ### Angular 2 35 | 36 | - [angular.io](https://angular.io/) - Official website for Angular and Angular 2. 37 | - [Getting Started](https://angular.io/docs/ts/latest/quickstart.html) - Quick guide on how to get up and running. 38 | - [Forum](https://thenewboston.com/forum/category.php?id=111) - For Angular 2 related questions, news, and discussion. 39 | - [Reddit](https://www.reddit.com/r/Angular2/) - Subreddit for Google's next iteration of AngularJS. 40 | 41 | ### Other 42 | 43 | - [thenewboston](https://thenewboston.com/) 44 | - [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) 45 | - [Twitter](https://twitter.com/bucky_roberts) 46 | - [Google+](https://plus.google.com/+BuckyRoberts) 47 | - [reddit](https://www.reddit.com/r/thenewboston/) 48 | - [Donate](https://www.patreon.com/thenewboston) 49 | -------------------------------------------------------------------------------- /app/ts/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from 'angular2/core'; 2 | 3 | @Component({ 4 | selector: 'my-app', 5 | template: '

Angular 2 Template

' 6 | }) 7 | 8 | export class AppComponent {} 9 | -------------------------------------------------------------------------------- /app/ts/main.ts: -------------------------------------------------------------------------------- 1 | import {bootstrap} from 'angular2/platform/browser'; 2 | import {AppComponent} from './app.component'; 3 | 4 | bootstrap(AppComponent); 5 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Angular 2 QuickStart 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 30 | 31 | 32 |
33 | Loading... 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-2", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ", 6 | "tsc": "tsc", 7 | "tsc:w": "tsc -w", 8 | "lite": "lite-server", 9 | "typings": "typings", 10 | "postinstall": "typings install" 11 | }, 12 | "license": "ISC", 13 | "dependencies": { 14 | "angular2": "2.0.0-beta.13", 15 | "systemjs": "0.19.25", 16 | "es6-shim": "^0.35.0", 17 | "reflect-metadata": "0.1.2", 18 | "rxjs": "5.0.0-beta.2", 19 | "zone.js": "0.6.6" 20 | }, 21 | "devDependencies": { 22 | "concurrently": "^2.0.0", 23 | "lite-server": "^2.1.0", 24 | "typescript": "^1.8.9", 25 | "typings":"^0.7.11" 26 | } 27 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "system", 5 | "moduleResolution": "node", 6 | "outDir": "app/js", 7 | "sourceMap": true, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "removeComments": false, 11 | "noImplicitAny": false 12 | }, 13 | "exclude": [ 14 | "node_modules", 15 | "typings/main", 16 | "typings/main.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ambientDependencies": { 3 | "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd", 4 | "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd" 5 | } 6 | } 7 | --------------------------------------------------------------------------------