Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Angular 2 Example
<my-app></my-app>
function AppComponent() {}
AppComponent.annotations = [
new angular.ComponentAnnotation({
selector: 'my-app'
}),
new angular.ViewAnnotation({
template: '<h1>My first Angular 2 App</h1>'
})
];
document.addEventListener('DOMContentLoaded', function() {
angular.bootstrap(AppComponent);
});
<script src="https://code.angularjs.org/2.0.0-alpha.26/angular2.sfx.dev.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment