docs(aio): update migrated content from anguar.io
This commit is contained in:

committed by
Pete Bacon Darwin

parent
ff82756415
commit
fd72fad8fd
@ -0,0 +1,3 @@
|
||||
{
|
||||
"build": "build:babel"
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
// #docregion
|
||||
describe("Jasmine sample test", function() {
|
||||
|
||||
it("1+1 should be 2", function() {
|
||||
var result = 1 + 1;
|
||||
expect(result).toBe(2);
|
||||
});
|
||||
});
|
@ -1,55 +0,0 @@
|
||||
(function(app) {
|
||||
|
||||
// #docregion
|
||||
// #docregion class-w-annotations
|
||||
app.AppComponent =
|
||||
// #docregion component
|
||||
ng.core.Component({
|
||||
selector: 'my-app',
|
||||
// #enddocregion
|
||||
// #docregion view
|
||||
template: '<h1 id="output">My First Angular App</h1>'
|
||||
})
|
||||
// #enddocregion
|
||||
// #docregion class
|
||||
.Class({
|
||||
constructor: function () { }
|
||||
});
|
||||
// #enddocregion
|
||||
// #enddocregion
|
||||
|
||||
// #docregion bootstrap
|
||||
app.AppModule =
|
||||
ng.core.NgModule({
|
||||
imports: [ ng.platformBrowser.BrowserModule ],
|
||||
declarations: [ app.AppComponent ],
|
||||
bootstrap: [ app.AppComponent ]
|
||||
})
|
||||
.Class({
|
||||
constructor: function() {}
|
||||
});
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
ng.platformBrowserDynamic
|
||||
.platformBrowserDynamic()
|
||||
.bootstrapModule(app.AppModule);
|
||||
});
|
||||
// #enddocregion
|
||||
// #enddocregion
|
||||
|
||||
})(window.app || (window.app = {}));
|
||||
|
||||
/* Non DSL Approach */
|
||||
(function(app) {
|
||||
|
||||
// #docregion no-dsl
|
||||
app.AppComponent = function AppComponent () {}
|
||||
|
||||
app.AppComponent.annotations = [
|
||||
new ng.core.Component({
|
||||
selector: 'my-app',
|
||||
template: '<h1 id="output">My First Angular App</h1>'
|
||||
})
|
||||
];
|
||||
// #enddocregion
|
||||
})(window.app || (window.app = {}));
|
Reference in New Issue
Block a user