Add Angular2

This commit is contained in:
József Farkas
2016-04-06 21:44:53 +02:00
parent 3d8b6eea1a
commit dcf5cbe4d8
9 changed files with 250 additions and 139 deletions

9
src/boot.ts Normal file
View File

@@ -0,0 +1,9 @@
///<reference path="../node_modules/angular2/typings/browser.d.ts"/>
import { bootstrap } from 'angular2/platform/browser';
import { HTTP_PROVIDERS } from 'angular2/http';
import { MainAppComponent } from './main-app.component';
bootstrap(MainAppComponent, [
HTTP_PROVIDERS
]).catch(err => console.error(err));

12
src/main-app.component.ts Normal file
View File

@@ -0,0 +1,12 @@
import { Component, OnInit } from 'angular2/core';
@Component({
selector: 'main-app',
template: 'It works!'
})
export class MainAppComponent implements OnInit {
constructor() { }
ngOnInit() { }
}

17
src/tsconfig.json Normal file
View File

@@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"../node_modules",
"../typings/main",
"../typings/main.d.ts"
]
}