<!DOCTYPE html>
<html>
<head>
<title>Angular 2.1.2 + TypeScript Starter Kit</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://unpkg.com/zone.js@0.6.21/dist/zone.js"></script>
<script src="https://unpkg.com/reflect-metadata@0.1.9/Reflect.js"></script>
<script src="https://unpkg.com/systemjs@0.19.41/dist/system.js"></script>
<script src="https://unpkg.com/typescript@2.1.4/lib/typescript.js"></script>
<script src="config.js"></script>
<script>
System.import('app')
.catch(console.error.bind(console));
</script>
</head>
<body>
<my-app>
loading...
</my-app>
</body>
</html>
# Angular 2.0.0 + TypeScript Plunker Starter Kit
I couldn't find this elsewhere, so I created one.
This is a simple Angular 2.0.0 (final) + TypeScript plunker. Fork it.
System.config({
transpiler: 'typescript',
typescriptOptions: {
emitDecoratorMetadata: true
},
map: {
app: "./src",
'@angular/core': 'npm:@angular/core@2.4.1/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common@2.4.1/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler@2.4.1/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser@2.4.1/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic@2.4.1/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http@2.4.1/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router@3.4.1/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms@2.4.1/bundles/forms.umd.js',
'@angular/core/testing': 'npm:@angular/core@2.4.1/bundles/core-testing.umd.js',
'@angular/common/testing': 'npm:@angular/common/bundles@2.4.1/common-testing.umd.js',
'@angular/compiler/testing': 'npm:@angular/compiler@2.4.1/bundles/compiler-testing.umd.js',
'@angular/platform-browser/testing': 'npm:@angular/platform-browser@2.4.1/bundles/platform-browser-testing.umd.js',
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic@2.4.1/bundles/platform-browser-dynamic-testing.umd.js',
'@angular/http/testing': 'npm:@angular/http@2.4.1/bundles/http-testing.umd.js',
'@angular/router/testing': 'npm:@angular/router@2.4.1/bundles/router-testing.umd.js',
'rxjs': 'npm:rxjs'
},
//packages defines our app package
packages: {
app: {
main: './main.ts',
defaultExtension: 'ts'
},
rxjs: {
defaultExtension: 'js'
}
},
paths: {
'npm:': 'https://unpkg.com/'
}
});
//main entry point
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app';
platformBrowserDynamic().bootstrapModule(AppModule)
import { Component, NgModule, OnInit } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
@Component({
selector: 'my-app',
template: `
<h1>Guten Tag!</h1>
`
})
export class App implements OnInit {
constructor() {}
ngOnInit() {}
}
@NgModule({
imports: [ BrowserModule ],
declarations: [ App ],
bootstrap: [ App ]
})
export class AppModule {}