update docshredder to shred .es6 optimized focus gulp task convert imports and metadate sections add DI section add host and query metadata section add intro fix capitalization and grammar
38 lines
741 B
JavaScript
38 lines
741 B
JavaScript
// #docplaster
|
|
// #docregion metadata
|
|
import { Component } from '@angular/core';
|
|
|
|
// #docregion class
|
|
// #docregion appexport
|
|
export class HeroComponent {
|
|
construct() {
|
|
this.title = 'Hero Detail';
|
|
}
|
|
getName() {return 'Windstorm'; }
|
|
}
|
|
// #enddocregion appexport
|
|
// #enddocregion class
|
|
|
|
HeroComponent.annotations = [
|
|
new Component({
|
|
selector: 'hero-view',
|
|
template: '<h1>Hero: {{getName()}}</h1>'
|
|
})
|
|
];
|
|
// #enddocregion metadata
|
|
|
|
import { NgModule } from '@angular/core';
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
|
|
export class HeroesModule { }
|
|
|
|
HeroesModule.annotations = [
|
|
new NgModule({
|
|
imports: [ BrowserModule ],
|
|
declarations: [ HeroComponent ],
|
|
bootstrap: [ HeroComponent ]
|
|
})
|
|
];
|
|
|
|
|