Created
December 5, 2015 22:04
-
-
Save kirjs/dfc34f3de8e8c922d985 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script src="https://code.angularjs.org/tools/system.js"></script> | |
<script src="https://code.angularjs.org/tools/typescript.js"></script> | |
<script src="https://code.angularjs.org/2.0.0-alpha.44/angular2.dev.js"></script> | |
<script> | |
System.config({ | |
transpiler: 'typescript', | |
typescriptOptions: { emitDecoratorMetadata: true } | |
}); | |
</script> | |
</head> | |
<body> | |
<my-app></my-app> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {bootstrap, Component} from 'angular2/angular2'; | |
@Component({ | |
selector: 'my-app', | |
template: '<h1>My First Angular 2 App</h1>' | |
}) | |
class AppComponent { } | |
bootstrap(AppComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do we do the same thing reducing the number of tings a user must learn
The @Component() decorator identifies the class immediately below it as a component, and provides the template and related component-specific metadata.