This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +340
-199
lines changed
_examples/gettingstarted/ts/src Expand file tree Collapse file tree 5 files changed +340
-199
lines changed Original file line number Diff line number Diff line change
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 ) ;
Original file line number Diff line number Diff line change 1
1
// #docregion
2
- // #docregion import
3
2
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>' } )
13
6
class AppComponent { }
14
- // #enddocregion class
15
- // #enddocregion class-w-annotations
16
7
17
- // #docregion bootstrap
18
8
bootstrap ( AppComponent ) ;
19
- // #enddocregion bootstrap
Original file line number Diff line number Diff line change
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 >
Original file line number Diff line number Diff line change 1
1
<!DOCTYPE html>
2
2
<!-- #docregion -->
3
3
< html >
4
+
4
5
< head >
5
- < script src ="../node_modules/traceur/bin/traceur-runtime.js "> </ script >
6
+ < title > Getting Started</ title >
7
+ <!-- #docregion libraries -->
6
8
< script src ="../node_modules/systemjs/dist/system.src.js "> </ script >
7
9
< 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 -->
12
12
< script >
13
13
System . config ( {
14
14
packages : { 'app' : { defaultExtension : 'js' } }
15
15
} ) ;
16
16
System . import ( 'app/app' ) ;
17
17
</ script >
18
+ <!-- #enddocregion systemjs -->
19
+ </ head >
20
+
21
+ < body >
22
+ < my-app > Loading...</ my-app >
18
23
</ body >
19
24
20
25
</ html >
You can’t perform that action at this time.
0 commit comments