Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 849a685

Browse files
wardbellnaomiblack
authored andcommitted
Rewrote Getting Started for an earlier, positive Ng2 experience
1 parent 6002389 commit 849a685

File tree

5 files changed

+340
-199
lines changed

5 files changed

+340
-199
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// #docregion
2+
import {Component, View, bootstrap} from 'angular2/angular2';
3+
4+
@Component({selector: 'my-app'})
5+
@View({template: '<h1>My First Angular 2 App</h1>'})
6+
class AppComponent { }
7+
8+
bootstrap(AppComponent);
Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
// #docregion
2-
// #docregion import
32
import {Component, View, bootstrap} from 'angular2/angular2';
4-
// #enddocregion import
5-
// #docregion class-w-annotations
6-
@Component({
7-
selector: 'my-app'
8-
})
9-
@View({
10-
template: '<h1>My First Angular 2 App</h1>'
11-
})
12-
// #docregion class
3+
4+
@Component({selector: 'my-app'})
5+
@View({template: '<h1>My First Angular 2 App</h1>'})
136
class AppComponent { }
14-
// #enddocregion class
15-
// #enddocregion class-w-annotations
167

17-
// #docregion bootstrap
188
bootstrap(AppComponent);
19-
// #enddocregion bootstrap
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<!-- #docregion -->
3+
<html>
4+
5+
<head>
6+
<title>Getting Started</title>
7+
<script src="https://code.angularjs.org/tools/traceur-runtime.js"></script>
8+
<script src="https://code.angularjs.org/tools/system.js"></script>
9+
<script src="https://code.angularjs.org/tools/typescript.js"></script>
10+
<script src="https://code.angularjs.org/2.0.0-alpha.37/angular2.dev.js"></script>
11+
<script>
12+
System.config({
13+
transpiler: 'typescript',
14+
typescriptOptions: { emitDecoratorMetadata: true }
15+
});
16+
System.import('./app.ts');
17+
</script>
18+
</head>
19+
20+
<body>
21+
<my-app>loading...</my-app>
22+
</body>
23+
24+
</html>
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
<!DOCTYPE html>
22
<!-- #docregion -->
33
<html>
4+
45
<head>
5-
<script src="../node_modules/traceur/bin/traceur-runtime.js"></script>
6+
<title>Getting Started</title>
7+
<!-- #docregion libraries -->
68
<script src="../node_modules/systemjs/dist/system.src.js"></script>
79
<script src="../node_modules/angular2/bundles/angular2.dev.js"></script>
8-
</head>
9-
10-
<body>
11-
<my-app>Loading...</my-app>
10+
<!-- #enddocregion libraries -->
11+
<!-- #docregion systemjs -->
1212
<script>
1313
System.config({
1414
packages: {'app': {defaultExtension: 'js'}}
1515
});
1616
System.import('app/app');
1717
</script>
18+
<!-- #enddocregion systemjs -->
19+
</head>
20+
21+
<body>
22+
<my-app>Loading...</my-app>
1823
</body>
1924

2025
</html>

0 commit comments

Comments
 (0)