A Pen by Alex Vazquez on CodePen.
Created
January 24, 2016 23:36
-
-
Save quezo/fd9d586a44712f93f618 to your computer and use it in GitHub Desktop.
Angular 2 Example
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
<my-app></my-app> |
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
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); | |
}); |
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
<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