docs: fix up irregular doc-region tags (#3285)
This commit is contained in:
parent
dfd072f40e
commit
e5b97e3a92
|
@ -11,7 +11,6 @@ import { MovieService } from './movie.service';
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
selector: 'movie-list',
|
selector: 'movie-list',
|
||||||
templateUrl: './movie-list.component.html',
|
templateUrl: './movie-list.component.html',
|
||||||
// #enddocregion component
|
|
||||||
// #docregion style-url
|
// #docregion style-url
|
||||||
styleUrls: [ './movie-list.component.css' ],
|
styleUrls: [ './movie-list.component.css' ],
|
||||||
// #enddocregion style-url
|
// #enddocregion style-url
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { HeroService } from './hero.service';
|
||||||
|
|
||||||
// #docregion runners-up
|
// #docregion runners-up
|
||||||
export const RUNNERS_UP = new OpaqueToken('RunnersUp');
|
export const RUNNERS_UP = new OpaqueToken('RunnersUp');
|
||||||
// #docregion runners-up
|
// #enddocregion runners-up
|
||||||
|
|
||||||
// #docregion factory-synopsis
|
// #docregion factory-synopsis
|
||||||
export function runnersUpFactory(take: number) {
|
export function runnersUpFactory(take: number) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ export class HeroFormReactiveComponent implements OnInit {
|
||||||
// to be removed/re-added in a tick via NgIf
|
// to be removed/re-added in a tick via NgIf
|
||||||
// TODO: Workaround until NgForm has a reset method (#6822)
|
// TODO: Workaround until NgForm has a reset method (#6822)
|
||||||
active = true;
|
active = true;
|
||||||
// #docregion
|
// #docregion class
|
||||||
// #docregion add-hero
|
// #docregion add-hero
|
||||||
addHero() {
|
addHero() {
|
||||||
this.hero = new Hero(42, '', '');
|
this.hero = new Hero(42, '', '');
|
||||||
|
|
|
@ -39,5 +39,5 @@ export class ForbiddenValidatorDirective implements Validator, OnChanges {
|
||||||
return this.valFn(control);
|
return this.valFn(control);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// #docregion directive
|
// #enddocregion directive
|
||||||
|
|
||||||
|
|
|
@ -46,5 +46,5 @@ HeroHostComponent.annotations = [
|
||||||
styles: ['.active {background-color: yellow;}']
|
styles: ['.active {background-color: yellow;}']
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
// #docregion metadata
|
// #enddocregion metadata
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
|
|
|
@ -81,6 +81,7 @@
|
||||||
|
|
||||||
<!-- ==================================================== -->
|
<!-- ==================================================== -->
|
||||||
<hr>
|
<hr>
|
||||||
|
<!-- #docregion phase1-->
|
||||||
<style>
|
<style>
|
||||||
.no-style .ng-valid {
|
.no-style .ng-valid {
|
||||||
border-left: 1px solid #CCC
|
border-left: 1px solid #CCC
|
||||||
|
|
|
@ -102,6 +102,7 @@
|
||||||
|
|
||||||
<!-- ==================================================== -->
|
<!-- ==================================================== -->
|
||||||
<hr>
|
<hr>
|
||||||
|
<!-- #docregion phase1-->
|
||||||
<style>
|
<style>
|
||||||
.no-style .ng-valid {
|
.no-style .ng-valid {
|
||||||
border-left: 1px solid #CCC
|
border-left: 1px solid #CCC
|
||||||
|
|
|
@ -43,7 +43,7 @@ import {
|
||||||
AwesomePipe,
|
AwesomePipe,
|
||||||
ContactComponent,
|
ContactComponent,
|
||||||
ContactHighlightDirective
|
ContactHighlightDirective
|
||||||
// #docregion declarations, directive, component
|
// #docregion directive, component
|
||||||
],
|
],
|
||||||
// #enddocregion declarations, directive, component
|
// #enddocregion declarations, directive, component
|
||||||
// #docregion providers
|
// #docregion providers
|
||||||
|
|
|
@ -20,7 +20,6 @@ import { AppRoutingModule } from './app-routing.module';
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
ContactModule,
|
ContactModule,
|
||||||
// #enddocregion v4
|
// #enddocregion v4
|
||||||
// #enddocregion
|
|
||||||
// #enddocregion import-for-root
|
// #enddocregion import-for-root
|
||||||
/*
|
/*
|
||||||
// #docregion v4
|
// #docregion v4
|
||||||
|
@ -28,7 +27,6 @@ import { AppRoutingModule } from './app-routing.module';
|
||||||
// #enddocregion v4
|
// #enddocregion v4
|
||||||
*/
|
*/
|
||||||
// #docregion import-for-root
|
// #docregion import-for-root
|
||||||
// #docregion
|
|
||||||
CoreModule.forRoot({userName: 'Miss Marple'}),
|
CoreModule.forRoot({userName: 'Miss Marple'}),
|
||||||
// #docregion v4
|
// #docregion v4
|
||||||
AppRoutingModule
|
AppRoutingModule
|
||||||
|
|
|
@ -60,4 +60,4 @@ export class FlyingHeroesComponent {
|
||||||
export class FlyingHeroesImpureComponent extends FlyingHeroesComponent {
|
export class FlyingHeroesImpureComponent extends FlyingHeroesComponent {
|
||||||
title = 'Flying Heroes (impure pipe)';
|
title = 'Flying Heroes (impure pipe)';
|
||||||
}
|
}
|
||||||
// #docregion impure-component
|
// #enddocregion impure-component
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { AdminDashboardComponent } from './admin-dashboard.component';
|
||||||
import { ManageCrisesComponent } from './manage-crises.component';
|
import { ManageCrisesComponent } from './manage-crises.component';
|
||||||
import { ManageHeroesComponent } from './manage-heroes.component';
|
import { ManageHeroesComponent } from './manage-heroes.component';
|
||||||
|
|
||||||
// #docregion admin-route, can-activate-child
|
// #docregion admin-route
|
||||||
import { AuthGuard } from '../auth-guard.service';
|
import { AuthGuard } from '../auth-guard.service';
|
||||||
|
|
||||||
const adminRoutes: Routes = [
|
const adminRoutes: Routes = [
|
||||||
|
@ -25,7 +25,6 @@ const adminRoutes: Routes = [
|
||||||
{ path: '', component: AdminDashboardComponent }
|
{ path: '', component: AdminDashboardComponent }
|
||||||
],
|
],
|
||||||
// #enddocregion admin-route
|
// #enddocregion admin-route
|
||||||
// #docregion can-activate-child
|
|
||||||
canActivateChild: [AuthGuard]
|
canActivateChild: [AuthGuard]
|
||||||
// #docregion admin-route
|
// #docregion admin-route
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import { Router } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
// #enddocregion
|
|
||||||
/* Typical link
|
/* Typical link
|
||||||
// #docregion h-anchor
|
// #docregion h-anchor
|
||||||
<a [routerLink]="['/heroes']">Heroes</a>
|
<a [routerLink]="['/heroes']">Heroes</a>
|
||||||
|
|
|
@ -10,9 +10,8 @@ import { PageNotFoundComponent } from './not-found.component';
|
||||||
|
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
import { HeroesModule } from './heroes/heroes.module';
|
import { HeroesModule } from './heroes/heroes.module';
|
||||||
// #docregion crisis-center-module
|
|
||||||
import { CrisisCenterModule } from './crisis-center/crisis-center.module';
|
import { CrisisCenterModule } from './crisis-center/crisis-center.module';
|
||||||
// #enddocregion crisis-center-module
|
// #enddocregion crisis-center-module, admin-module
|
||||||
import { ComposeMessageComponent } from './compose-message.component';
|
import { ComposeMessageComponent } from './compose-message.component';
|
||||||
// #docregion admin-module
|
// #docregion admin-module
|
||||||
import { AdminModule } from './admin/admin.module';
|
import { AdminModule } from './admin/admin.module';
|
||||||
|
@ -27,7 +26,6 @@ import { DialogService } from './dialog.service';
|
||||||
HeroesModule,
|
HeroesModule,
|
||||||
CrisisCenterModule,
|
CrisisCenterModule,
|
||||||
// #enddocregion crisis-center-module
|
// #enddocregion crisis-center-module
|
||||||
// #enddocregion admin-module
|
|
||||||
AdminModule,
|
AdminModule,
|
||||||
// #docregion crisis-center-module
|
// #docregion crisis-center-module
|
||||||
AppRoutingModule
|
AppRoutingModule
|
||||||
|
|
|
@ -58,7 +58,7 @@ const crisisCenterRoutes: Routes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
// #docregion routes
|
// #enddocregion routes
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -70,4 +70,3 @@ const crisisCenterRoutes: Routes = [
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class CrisisCenterRoutingModule { }
|
export class CrisisCenterRoutingModule { }
|
||||||
// #enddocregion
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ import { CrisisCenterRoutingModule } from './crisis-center-routing.module';
|
||||||
providers: [
|
providers: [
|
||||||
CrisisService
|
CrisisService
|
||||||
]
|
]
|
||||||
// #enddocregion crisis-detail-resolver
|
|
||||||
})
|
})
|
||||||
// #docregion crisis-center-module-export
|
// #docregion crisis-center-module-export
|
||||||
export class CrisisCenterModule {}
|
export class CrisisCenterModule {}
|
||||||
|
|
|
@ -14,7 +14,6 @@ const CRISES = [
|
||||||
|
|
||||||
let crisesPromise = Promise.resolve(CRISES);
|
let crisesPromise = Promise.resolve(CRISES);
|
||||||
|
|
||||||
// #docregion
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
|
@ -39,7 +39,6 @@ export class HeroListComponent implements OnInit {
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router
|
private router: Router
|
||||||
) {}
|
) {}
|
||||||
// #enddocregion ctor
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.heroes = this.route.params
|
this.heroes = this.route.params
|
||||||
|
|
|
@ -144,5 +144,5 @@ function tests() {
|
||||||
|
|
||||||
expect(heroesLink.navigatedTo).toBe('/heroes');
|
expect(heroesLink.navigatedTo).toBe('/heroes');
|
||||||
});
|
});
|
||||||
// #docregion tests
|
// #enddocregion tests
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ import { HeroService } from './hero.service';
|
||||||
component: HeroDetailComponent
|
component: HeroDetailComponent
|
||||||
},
|
},
|
||||||
// #enddocregion hero-detail
|
// #enddocregion hero-detail
|
||||||
// #docregion heroes
|
|
||||||
// #docregion heroes, routing
|
// #docregion heroes, routing
|
||||||
{
|
{
|
||||||
path: 'heroes',
|
path: 'heroes',
|
||||||
|
|
|
@ -75,7 +75,7 @@ export class HeroService {
|
||||||
.then(() => hero)
|
.then(() => hero)
|
||||||
.catch(this.handleError);
|
.catch(this.handleError);
|
||||||
}
|
}
|
||||||
// #enddocregion put, update
|
// #enddocregion update
|
||||||
|
|
||||||
// #docregion getHeroes, handleError
|
// #docregion getHeroes, handleError
|
||||||
private handleError(error: any): Promise<any> {
|
private handleError(error: any): Promise<any> {
|
||||||
|
|
|
@ -54,7 +54,6 @@ import { PhoneDetailComponent } from './phone-detail/phone-detail.component';
|
||||||
PhoneListComponent,
|
PhoneListComponent,
|
||||||
// #enddocregion phonelist
|
// #enddocregion phonelist
|
||||||
PhoneDetailComponent
|
PhoneDetailComponent
|
||||||
// #enddocregion phonedetail
|
|
||||||
],
|
],
|
||||||
// #docregion phone, routeparams
|
// #docregion phone, routeparams
|
||||||
providers: [
|
providers: [
|
||||||
|
@ -64,7 +63,7 @@ import { PhoneDetailComponent } from './phone-detail/phone-detail.component';
|
||||||
// #docregion phone
|
// #docregion phone
|
||||||
]
|
]
|
||||||
// #enddocregion routeparams
|
// #enddocregion routeparams
|
||||||
// #docregion bare, upgrademodule, httpmodule, phone, phonelist
|
// #docregion bare, upgrademodule, httpmodule, phonelist
|
||||||
})
|
})
|
||||||
export class AppModule {
|
export class AppModule {
|
||||||
// #enddocregion bare
|
// #enddocregion bare
|
||||||
|
|
|
@ -40,5 +40,5 @@
|
||||||
<body>
|
<body>
|
||||||
<phonecat-app></phonecat-app>
|
<phonecat-app></phonecat-app>
|
||||||
</body>
|
</body>
|
||||||
<!-- #docregion appcomponent -->
|
<!-- #enddocregion appcomponent -->
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -31,6 +31,6 @@
|
||||||
<body>
|
<body>
|
||||||
<phonecat-app></phonecat-app>
|
<phonecat-app></phonecat-app>
|
||||||
</body>
|
</body>
|
||||||
<!-- #docregion appcomponent -->
|
<!-- #enddocregion appcomponent -->
|
||||||
</html>
|
</html>
|
||||||
<!-- #enddocregion full -->
|
<!-- #enddocregion full -->
|
||||||
|
|
|
@ -56,4 +56,3 @@ plugins: [
|
||||||
new webpack.optimize.UglifyJsPlugin()
|
new webpack.optimize.UglifyJsPlugin()
|
||||||
]
|
]
|
||||||
// #enddocregion plugins
|
// #enddocregion plugins
|
||||||
// #enddocregion
|
|
||||||
|
|
Loading…
Reference in New Issue