Add Angular2
This commit is contained in:
9
src/boot.ts
Normal file
9
src/boot.ts
Normal 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
12
src/main-app.component.ts
Normal 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
17
src/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user