Ward Bell b7ee016000 (docs) gettingstarted: Update to alpha-37 and latest guidance
-- squashed commits --
(examples) gettingstarted: Update to alpha-37
(fix) gettingstarted: remove id=output from template; e2e spec looks for h1 instead
(fix) gettingstarted: simplified tsd commands
(fix) gettingstarted: simplified tsd commands
gettingStarted.jade updated for tooling-4
(docs) gettingstarted example revised for system 0.19, tsd 0.6.5, and as preface to ToH
(docs) update gettingstarted to our current recommendation (still needs to be vetted)
(docs) fix:gettingStarted.jade - small clarification after following instructions on clean directory.
(docs) gettingstarted jade updated w/ tool version advice and John's suggestions
2015-09-30 13:05:01 -07:00

47 lines
868 B
JavaScript

(function() {
// #docregion
// #docregion class-w-annotations
var AppComponent = ng
// #docregion component
.Component({
selector: 'my-app'
})
// #enddocregion
// #docregion view
.View({
template: '<h1>My First Angular 2 App</h1>'
})
// #enddocregion
// #docregion class
.Class({
constructor: function () { }
});
// #enddocregion
// #enddocregion
// #docregion bootstrap
document.addEventListener('DOMContentLoaded', function() {
ng.bootstrap(AppComponent);
});
// #enddocregion
// #enddocregion
})();
/* Non DSL Approach */
(function() {
// #docregion no-dsl
function AppComponent () {}
AppComponent.annotations = [
new ng.ComponentAnnotation({
selector: 'my-app'
}),
new ng.ViewAnnotation({
template: '<h1 id="output">My First Angular 2 App</h1>'
})
];
// #enddocregion
})();