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