diff --git a/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.html b/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.html
index 9de98806d7..e1ee6d62c5 100644
--- a/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.html
+++ b/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.html
@@ -67,9 +67,7 @@
diff --git a/aio/content/examples/attribute-directives/src/app/highlight.directive.2.ts b/aio/content/examples/attribute-directives/src/app/highlight.directive.2.ts
index d039083beb..0b31849ca5 100644
--- a/aio/content/examples/attribute-directives/src/app/highlight.directive.2.ts
+++ b/aio/content/examples/attribute-directives/src/app/highlight.directive.2.ts
@@ -14,19 +14,14 @@ export class HighlightDirective {
constructor(private el: ElementRef) { }
// #enddocregion ctor
- // #docregion mouse-methods, host
+ // #docregion mouse-methods
@HostListener('mouseenter') onMouseEnter() {
- // #enddocregion host
this.highlight('yellow');
- // #docregion host
}
@HostListener('mouseleave') onMouseLeave() {
- // #enddocregion host
this.highlight(null);
- // #docregion host
}
- // #enddocregion host
private highlight(color: string) {
this.el.nativeElement.style.backgroundColor = color;
diff --git a/aio/content/examples/bootstrapping/src/app/app.module.ts b/aio/content/examples/bootstrapping/src/app/app.module.ts
index 3059978a82..b7d1a9bbae 100644
--- a/aio/content/examples/bootstrapping/src/app/app.module.ts
+++ b/aio/content/examples/bootstrapping/src/app/app.module.ts
@@ -1,6 +1,4 @@
// #docplaster
-// #docregion whole-ngmodule
-
// imports
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
@@ -32,5 +30,3 @@ import { ItemDirective } from './item.directive';
bootstrap: [AppComponent]
})
export class AppModule { }
-
-// #enddocregion whole-ngmodule
diff --git a/aio/content/examples/component-styles/src/app/hero-details.component.ts b/aio/content/examples/component-styles/src/app/hero-details.component.ts
index 3a249b753a..3d4dbd0712 100644
--- a/aio/content/examples/component-styles/src/app/hero-details.component.ts
+++ b/aio/content/examples/component-styles/src/app/hero-details.component.ts
@@ -1,7 +1,6 @@
import { Component, Input } from '@angular/core';
import { Hero } from './hero';
-// #docregion styleurls
@Component({
selector: 'app-hero-details',
template: `
@@ -12,7 +11,5 @@ import { Hero } from './hero';
styleUrls: ['./hero-details.component.css']
})
export class HeroDetailsComponent {
- // #enddocregion styleurls
@Input() hero: Hero;
- // #docregion styleurls
}
diff --git a/aio/content/examples/component-styles/src/app/quest-summary.component.ts b/aio/content/examples/component-styles/src/app/quest-summary.component.ts
index 6d7b580582..9b75c0f403 100644
--- a/aio/content/examples/component-styles/src/app/quest-summary.component.ts
+++ b/aio/content/examples/component-styles/src/app/quest-summary.component.ts
@@ -5,10 +5,8 @@ import { Component, ViewEncapsulation } from '@angular/core';
// #docregion
@Component({
selector: 'app-quest-summary',
- // #docregion urls
templateUrl: './quest-summary.component.html',
styleUrls: ['./quest-summary.component.css']
- // #enddocregion urls
})
export class QuestSummaryComponent { }
// #enddocregion
diff --git a/aio/content/examples/dependency-injection-in-action/src/app/app.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/app.component.ts
index 3c1f49682f..052b4eb114 100644
--- a/aio/content/examples/dependency-injection-in-action/src/app/app.component.ts
+++ b/aio/content/examples/dependency-injection-in-action/src/app/app.component.ts
@@ -1,26 +1,18 @@
-// #docregion
import { Component } from '@angular/core';
-// #docregion import-services
import { LoggerService } from './logger.service';
import { UserContextService } from './user-context.service';
-import { UserService } from './user.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
})
export class AppComponent {
-// #enddocregion import-services
private userId = 1;
- // #docregion ctor
constructor(logger: LoggerService, public userContext: UserContextService) {
userContext.loadUser(this.userId);
logger.logInfo('AppComponent initialized');
}
- // #enddocregion ctor
-// #docregion import-services
}
-// #enddocregion import-services
diff --git a/aio/content/examples/dependency-injection-in-action/src/app/date-logger.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/date-logger.service.ts
index a2a1f02092..23a802b0f6 100644
--- a/aio/content/examples/dependency-injection-in-action/src/app/date-logger.service.ts
+++ b/aio/content/examples/dependency-injection-in-action/src/app/date-logger.service.ts
@@ -8,9 +8,7 @@ import { LoggerService } from './logger.service';
@Injectable({
providedIn: 'root'
})
-// #docregion date-logger-service-signature
export class DateLoggerService extends LoggerService
-// #enddocregion date-logger-service-signature
{
logInfo(msg: any) { super.logInfo(stamp(msg)); }
logDebug(msg: any) { super.logInfo(stamp(msg)); }
diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-bios.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero-bios.component.ts
index ee2fdf88ec..e2a03e42b4 100644
--- a/aio/content/examples/dependency-injection-in-action/src/app/hero-bios.component.ts
+++ b/aio/content/examples/dependency-injection-in-action/src/app/hero-bios.component.ts
@@ -17,11 +17,9 @@ import { LoggerService } from './logger.service';
})
export class HeroBiosComponent {
// #enddocregion simple
-// #docregion ctor
constructor(logger: LoggerService) {
logger.logInfo('Creating HeroBiosComponent');
}
-// #enddocregion ctor
// #docregion simple
}
// #enddocregion simple
@@ -36,9 +34,7 @@ export class HeroBiosComponent {
`,
// #enddocregion template
- // #docregion class-provider
providers: [HeroService]
- // #enddocregion class-provider
})
export class HeroBiosAndContactsComponent {
constructor(logger: LoggerService) {
diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-contact.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero-contact.component.ts
index bdf78a3641..e986c37370 100644
--- a/aio/content/examples/dependency-injection-in-action/src/app/hero-contact.component.ts
+++ b/aio/content/examples/dependency-injection-in-action/src/app/hero-contact.component.ts
@@ -30,9 +30,7 @@ export class HeroContactComponent {
this.hasLogger = true;
loggerService.logInfo('HeroContactComponent can log!');
}
- // #docregion ctor
}
- // #enddocregion ctor
get phoneNumber() { return this.heroCache.hero.phone; }
diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.ts
index 9630fe3575..1f320a89d1 100644
--- a/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.ts
+++ b/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.ts
@@ -48,13 +48,11 @@ const someHero = new Hero(42, 'Magma', 'Had a great month!', '555-555-5555');
export class HeroOfTheMonthComponent {
logs: string[] = [];
-// #docregion ctor-signature
constructor(
logger: MinimalLogger,
public heroOfTheMonth: Hero,
@Inject(RUNNERS_UP) public runnersUp: string,
@Inject(TITLE) public title: string)
-// #enddocregion ctor-signature
{
this.logs = logger.logs;
logger.logInfo('starting up');
diff --git a/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts
index cf25406ed5..4596b3b497 100644
--- a/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts
+++ b/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts
@@ -35,7 +35,6 @@ export function provideTheParent
///////// C - Child //////////
-// #docregion carol
const templateC = `
{{name}}
@@ -54,7 +53,6 @@ export class CarolComponent {
// #enddocregion carol-ctor
}
// #enddocregion carol-class
-// #enddocregion carol
@Component({
selector: 'chris',
@@ -132,7 +130,7 @@ export class BethComponent implements Parent {
///////// A - Grandparent //////
-// #docregion alex, alex-1
+// #docregion alex-1
@Component({
selector: 'alex',
template: `
@@ -157,11 +155,10 @@ export class AlexComponent extends Base
{
name = 'Alex';
}
-// #enddocregion alex, alex-1
+// #enddocregion alex-1
/////
-// #docregion alice
@Component({
selector: 'alice',
template: `
@@ -182,7 +179,6 @@ export class AliceComponent implements Parent
{
name = 'Alice';
}
-// #enddocregion alice
////// Cathy ///////////
/**
diff --git a/aio/content/examples/dependency-injection-in-action/src/app/runners-up.ts b/aio/content/examples/dependency-injection-in-action/src/app/runners-up.ts
index 1c0afb823c..b06115e0b7 100644
--- a/aio/content/examples/dependency-injection-in-action/src/app/runners-up.ts
+++ b/aio/content/examples/dependency-injection-in-action/src/app/runners-up.ts
@@ -5,9 +5,7 @@ import { InjectionToken } from '@angular/core';
import { Hero } from './hero';
import { HeroService } from './hero.service';
-// #docregion runners-up
export const RUNNERS_UP = new InjectionToken
('RunnersUp');
-// #enddocregion runners-up
// #docregion factory-synopsis
export function runnersUpFactory(take: number) {
diff --git a/aio/content/examples/dependency-injection-in-action/src/app/sorted-heroes.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/sorted-heroes.component.ts
index 9f25b2a9a8..68a05a8776 100644
--- a/aio/content/examples/dependency-injection-in-action/src/app/sorted-heroes.component.ts
+++ b/aio/content/examples/dependency-injection-in-action/src/app/sorted-heroes.component.ts
@@ -6,7 +6,7 @@ import { Hero } from './hero';
import { HeroService } from './hero.service';
/////// HeroesBaseComponent /////
-// #docregion heroes-base, injection
+// #docregion heroes-base
@Component({
selector: 'app-unsorted-heroes',
template: `{{hero.name}}
`,
@@ -14,7 +14,6 @@ import { HeroService } from './hero.service';
})
export class HeroesBaseComponent implements OnInit {
constructor(private heroService: HeroService) { }
-// #enddocregion injection
heroes: Array;
@@ -26,9 +25,8 @@ export class HeroesBaseComponent implements OnInit {
// Post-process heroes in derived class override.
protected afterGetHeroes() {}
-// #docregion injection
}
-// #enddocregion heroes-base,injection
+// #enddocregion heroes-base
/////// SortedHeroesComponent /////
// #docregion sorted-heroes
diff --git a/aio/content/examples/dependency-injection-in-action/src/app/storage.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/storage.service.ts
index df59c4e08a..a31f5a3905 100644
--- a/aio/content/examples/dependency-injection-in-action/src/app/storage.service.ts
+++ b/aio/content/examples/dependency-injection-in-action/src/app/storage.service.ts
@@ -1,14 +1,10 @@
-// #docregion
import { Inject, Injectable, InjectionToken } from '@angular/core';
-// #docregion storage-token
export const BROWSER_STORAGE = new InjectionToken('Browser Storage', {
providedIn: 'root',
factory: () => localStorage
});
-// #enddocregion storage-token
-// #docregion inject-storage-token
@Injectable({
providedIn: 'root'
})
@@ -31,4 +27,3 @@ export class BrowserStorageService {
this.storage.clear();
}
}
-// #enddocregion inject-storage-token
diff --git a/aio/content/examples/dependency-injection-in-action/src/app/user-context.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/user-context.service.ts
index e6419c5106..1a08a28b05 100644
--- a/aio/content/examples/dependency-injection-in-action/src/app/user-context.service.ts
+++ b/aio/content/examples/dependency-injection-in-action/src/app/user-context.service.ts
@@ -1,27 +1,19 @@
-// #docplaster
-// #docregion
import { Injectable } from '@angular/core';
import { LoggerService } from './logger.service';
import { UserService } from './user.service';
-// #docregion injectables, injectable
@Injectable({
providedIn: 'root'
})
export class UserContextService {
-// #enddocregion injectables, injectable
name: string;
role: string;
loggedInSince: Date;
- // #docregion ctor, injectables
constructor(private userService: UserService, private loggerService: LoggerService) {
- // #enddocregion ctor, injectables
this.loggedInSince = new Date();
- // #docregion ctor, injectables
}
- // #enddocregion ctor, injectables
loadUser(userId: number) {
const user = this.userService.getUserById(userId);
@@ -30,6 +22,4 @@ export class UserContextService {
this.loggerService.logDebug('loaded User');
}
-// #docregion injectables, injectable
}
-// #enddocregion injectables, injectable
diff --git a/aio/content/examples/dependency-injection/src/app/app.component.2.ts b/aio/content/examples/dependency-injection/src/app/app.component.2.ts
index 1d775e9214..461cfe4a51 100644
--- a/aio/content/examples/dependency-injection/src/app/app.component.2.ts
+++ b/aio/content/examples/dependency-injection/src/app/app.component.2.ts
@@ -1,9 +1,6 @@
-// #docregion
-// #docregion imports
import { Component, Inject } from '@angular/core';
import { APP_CONFIG, AppConfig } from './app.config';
-// #enddocregion imports
@Component({
selector: 'app-root',
@@ -22,5 +19,3 @@ export class AppComponent {
}
// #enddocregion ctor
}
-// #enddocregion
-
diff --git a/aio/content/examples/dependency-injection/src/app/app.component.ts b/aio/content/examples/dependency-injection/src/app/app.component.ts
index b69856fa0a..a02e3e6682 100644
--- a/aio/content/examples/dependency-injection/src/app/app.component.ts
+++ b/aio/content/examples/dependency-injection/src/app/app.component.ts
@@ -1,11 +1,7 @@
-// #docplaster
-// #docregion
-// #docregion imports
import { Component, Inject } from '@angular/core';
import { APP_CONFIG, AppConfig } from './app.config';
import { UserService } from './user.service';
-// #enddocregion imports
@Component({
selector: 'app-root',
@@ -28,13 +24,11 @@ import { UserService } from './user.service';
export class AppComponent {
title: string;
- // #docregion ctor
constructor(
@Inject(APP_CONFIG) config: AppConfig,
private userService: UserService) {
this.title = config.title;
}
- // #enddocregion ctor
get isAuthorized() { return this.user.isAuthorized; }
nextUser() { this.userService.getNewUser(); }
diff --git a/aio/content/examples/dependency-injection/src/app/app.module.ts b/aio/content/examples/dependency-injection/src/app/app.module.ts
index 981faba079..2bf52f9c1f 100644
--- a/aio/content/examples/dependency-injection/src/app/app.module.ts
+++ b/aio/content/examples/dependency-injection/src/app/app.module.ts
@@ -15,7 +15,6 @@ import { UserService } from './user.service';
import { ProvidersModule } from './providers.module';
-// #docregion ngmodule
@NgModule({
imports: [
BrowserModule,
@@ -25,14 +24,12 @@ import { ProvidersModule } from './providers.module';
AppComponent,
CarComponent,
HeroesComponent,
- // #enddocregion ngmodule
HeroesTspComponent,
HeroListComponent,
InjectorComponent,
TestComponent
- // #docregion ngmodule
],
- // #docregion providers, providers-2
+ // #docregion providers
providers: [
// #enddocregion providers
Logger,
@@ -40,7 +37,7 @@ import { ProvidersModule } from './providers.module';
UserService,
{ provide: APP_CONFIG, useValue: HERO_DI_CONFIG }
],
- // #enddocregion providers, providers-2
+ // #enddocregion providers
exports: [ CarComponent, HeroesComponent ],
bootstrap: [ AppComponent ]
})
diff --git a/aio/content/examples/dependency-injection/src/app/car/car-creations.ts b/aio/content/examples/dependency-injection/src/app/car/car-creations.ts
index 23011ee626..143a63a1f4 100644
--- a/aio/content/examples/dependency-injection/src/app/car/car-creations.ts
+++ b/aio/content/examples/dependency-injection/src/app/car/car-creations.ts
@@ -1,47 +1,36 @@
// Examples with car and engine variations
-// #docplaster
import { Car, Engine, Tires } from './car';
///////// example 1 ////////////
export function simpleCar() {
- // #docregion car-ctor-instantiation
// Simple car with 4 cylinders and Flintstone tires.
const car = new Car(new Engine(), new Tires());
- // #enddocregion car-ctor-instantiation
car.description = 'Simple';
return car;
}
///////// example 2 ////////////
-// #docregion car-ctor-instantiation-with-param
class Engine2 {
constructor(public cylinders: number) { }
}
-// #enddocregion car-ctor-instantiation-with-param
export function superCar() {
- // #docregion car-ctor-instantiation-with-param
// Super car with 12 cylinders and Flintstone tires.
const bigCylinders = 12;
const car = new Car(new Engine2(bigCylinders), new Tires());
- // #enddocregion car-ctor-instantiation-with-param
car.description = 'Super';
return car;
}
/////////// example 3 //////////
-// #docregion car-ctor-instantiation-with-mocks
class MockEngine extends Engine { cylinders = 8; }
class MockTires extends Tires { make = 'YokoGoodStone'; }
-// #enddocregion car-ctor-instantiation-with-mocks
export function testCar() {
- // #docregion car-ctor-instantiation-with-mocks
// Test car with 8 cylinders and YokoGoodStone tires.
const car = new Car(new MockEngine(), new MockTires());
- // #enddocregion car-ctor-instantiation-with-mocks
car.description = 'Test';
return car;
}
diff --git a/aio/content/examples/dependency-injection/src/app/car/car-injector.ts b/aio/content/examples/dependency-injection/src/app/car/car-injector.ts
index 9611bb0073..ba2449b6ff 100644
--- a/aio/content/examples/dependency-injection/src/app/car/car-injector.ts
+++ b/aio/content/examples/dependency-injection/src/app/car/car-injector.ts
@@ -3,21 +3,16 @@ import { Injector } from '@angular/core';
import { Car, Engine, Tires } from './car';
import { Logger } from '../logger.service';
-// #docregion injector
export function useInjector() {
let injector: Injector;
- // #enddocregion injector
/*
- // #docregion injector-no-new
// Cannot instantiate an Injector like this!
let injector = new Injector([
{ provide: Car, deps: [Engine, Tires] },
{ provide: Engine, deps: [] },
{ provide: Tires, deps: [] }
]);
- // #enddocregion injector-no-new
*/
- // #docregion injector, injector-create-and-call
injector = Injector.create({
providers: [
{ provide: Car, deps: [Engine, Tires] },
@@ -25,9 +20,7 @@ export function useInjector() {
{ provide: Tires, deps: [] }
]
});
- // #docregion injector-call
const car = injector.get(Car);
- // #enddocregion injector-call, injector-create-and-call
car.description = 'Injector';
injector = Injector.create({
diff --git a/aio/content/examples/dependency-injection/src/app/car/car-no-di.ts b/aio/content/examples/dependency-injection/src/app/car/car-no-di.ts
index 9026edebc2..07a5864fa1 100644
--- a/aio/content/examples/dependency-injection/src/app/car/car-no-di.ts
+++ b/aio/content/examples/dependency-injection/src/app/car/car-no-di.ts
@@ -1,10 +1,8 @@
// Car without DI
import { Engine, Tires } from './car';
-// #docregion car
export class Car {
- // #docregion car-ctor
public engine: Engine;
public tires: Tires;
public description = 'No DI';
@@ -13,7 +11,6 @@ export class Car {
this.engine = new Engine();
this.tires = new Tires();
}
- // #enddocregion car-ctor
// Method using the engine and tires
drive() {
@@ -21,4 +18,3 @@ export class Car {
`${this.engine.cylinders} cylinders and ${this.tires.make} tires.`;
}
}
-// #enddocregion car
diff --git a/aio/content/examples/dependency-injection/src/app/car/car.ts b/aio/content/examples/dependency-injection/src/app/car/car.ts
index 37162c570b..04b87c0284 100644
--- a/aio/content/examples/dependency-injection/src/app/car/car.ts
+++ b/aio/content/examples/dependency-injection/src/app/car/car.ts
@@ -11,11 +11,9 @@ export class Tires {
@Injectable()
export class Car {
- // #docregion car-ctor
public description = 'DI';
constructor(public engine: Engine, public tires: Tires) { }
- // #enddocregion car-ctor
// Method using the engine and tires
drive() {
diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.1.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.1.ts
index 995d2e4441..24536ef6a0 100644
--- a/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.1.ts
+++ b/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.1.ts
@@ -1,4 +1,3 @@
-// #docregion
import { Component } from '@angular/core';
import { HEROES } from './mock-heroes';
@@ -10,8 +9,6 @@ import { HEROES } from './mock-heroes';
`
})
-// #docregion class
export class HeroListComponent {
heroes = HEROES;
}
-// #enddocregion class
diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.2.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.2.ts
index b126a0361e..836116fa80 100644
--- a/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.2.ts
+++ b/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.2.ts
@@ -22,9 +22,7 @@ import { HeroService } from './hero.service';
export class HeroListComponent {
heroes: Hero[];
- // #docregion ctor
constructor(heroService: HeroService) {
this.heroes = heroService.getHeroes();
}
- // #enddocregion ctor
}
diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.2.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero.service.2.ts
index a9bf656e92..f0eb33de0c 100644
--- a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.2.ts
+++ b/aio/content/examples/dependency-injection/src/app/heroes/hero.service.2.ts
@@ -1,4 +1,3 @@
-// #docregion
import { Injectable } from '@angular/core';
import { HEROES } from './mock-heroes';
import { Logger } from '../logger.service';
@@ -8,9 +7,7 @@ import { Logger } from '../logger.service';
})
export class HeroService {
- // #docregion ctor
constructor(private logger: Logger) { }
- // #enddocregion ctor
getHeroes() {
this.logger.log('Getting heroes ...');
diff --git a/aio/content/examples/dependency-injection/src/app/heroes/heroes.component.1.ts b/aio/content/examples/dependency-injection/src/app/heroes/heroes.component.1.ts
index a9e40e902c..ad6182b17e 100644
--- a/aio/content/examples/dependency-injection/src/app/heroes/heroes.component.1.ts
+++ b/aio/content/examples/dependency-injection/src/app/heroes/heroes.component.1.ts
@@ -1,16 +1,10 @@
-// #docplaster
-// #docregion, v1
import { Component } from '@angular/core';
-// #enddocregion v1
import { HeroService } from './hero.service';
-// #docregion v1
@Component({
selector: 'app-heroes',
- // #enddocregion v1
providers: [ HeroService ],
- // #docregion v1
template: `
Heroes
diff --git a/aio/content/examples/dependency-injection/src/app/injector.component.ts b/aio/content/examples/dependency-injection/src/app/injector.component.ts
index f04bf022d5..cf2b50b38c 100644
--- a/aio/content/examples/dependency-injection/src/app/injector.component.ts
+++ b/aio/content/examples/dependency-injection/src/app/injector.component.ts
@@ -8,7 +8,6 @@ import { HeroService } from './heroes/hero.service';
import { heroServiceProvider } from './heroes/hero.service.provider';
import { Logger } from './logger.service';
-// #docregion injector
@Component({
selector: 'app-injectors',
template: `
@@ -40,7 +39,6 @@ export class InjectorComponent implements OnInit {
return this.injector.get(ROUS, rousDontExist);
}
}
-// #enddocregion injector
/**
* R.O.U.S. - Rodents Of Unusual Size
diff --git a/aio/content/examples/dependency-injection/src/app/providers.component.ts b/aio/content/examples/dependency-injection/src/app/providers.component.ts
index 5b1e770297..ee5ade88e0 100644
--- a/aio/content/examples/dependency-injection/src/app/providers.component.ts
+++ b/aio/content/examples/dependency-injection/src/app/providers.component.ts
@@ -19,9 +19,9 @@ const template = '{{log}}';
@Component({
selector: 'provider-1',
template,
- // #docregion providers-1, providers-logger
+ // #docregion providers-logger
providers: [Logger]
- // #enddocregion providers-1, providers-logger
+ // #enddocregion providers-logger
})
export class Provider1Component {
log: string;
@@ -114,11 +114,9 @@ export class OldLogger {
selector: 'provider-6a',
template,
providers:
- // #docregion providers-6a
[ NewLogger,
// Not aliased! Creates two instances of `NewLogger`
{ provide: OldLogger, useClass: NewLogger}]
- // #enddocregion providers-6a
})
export class Provider6aComponent {
log: string;
@@ -193,9 +191,7 @@ export class Provider8Component {
// must be true else this component would have blown up at runtime
log = 'Hero service injected successfully via heroServiceProvider';
- // #docregion provider-8-ctor
constructor(heroService: HeroService) { }
- // #enddocregion provider-8-ctor
}
/////////////////
@@ -221,9 +217,7 @@ export class Provider9Component implements OnInit {
constructor(private config: AppConfig){ }
// #enddocregion provider-9-ctor-interface
*/
- // #docregion provider-9-ctor
constructor(@Inject(APP_CONFIG) private config: AppConfig) { }
- // #enddocregion provider-9-ctor
ngOnInit() {
this.log = 'APP_CONFIG Application title is ' + this.config.title;
@@ -233,9 +227,7 @@ export class Provider9Component implements OnInit {
//////////////////////////////////////////
// Sample providers 1 to 7 illustrate a required logger dependency.
// Optional logger, can be null
-// #docregion import-optional
import { Optional } from '@angular/core';
-// #enddocregion import-optional
const someMessage = 'Hello from the injected logger';
@@ -246,13 +238,11 @@ const someMessage = 'Hello from the injected logger';
})
export class Provider10Component implements OnInit {
log: string;
- // #docregion provider-10-ctor
constructor(@Optional() private logger?: Logger) {
if (this.logger) {
this.logger.log(someMessage);
}
}
- // #enddocregion provider-10-ctor
ngOnInit() {
this.log = this.logger ? this.logger.logs[0] : 'Optional logger was not available';
diff --git a/aio/content/examples/dependency-injection/src/app/test.component.ts b/aio/content/examples/dependency-injection/src/app/test.component.ts
index 9a82764f78..946cb71ad8 100644
--- a/aio/content/examples/dependency-injection/src/app/test.component.ts
+++ b/aio/content/examples/dependency-injection/src/app/test.component.ts
@@ -22,7 +22,6 @@ export class TestComponent {
/////////////////////////////////////
function runTests() {
- // #docregion spec
const expectedHeroes = [{name: 'A'}, {name: 'B'}]
const mockService =
{getHeroes: () => expectedHeroes }
@@ -31,7 +30,6 @@ function runTests() {
const component = new HeroListComponent(mockService);
expect(component.heroes.length).toEqual(expectedHeroes.length);
});
- // #enddocregion spec
return testResults;
}
diff --git a/aio/content/examples/dependency-injection/src/main.ts b/aio/content/examples/dependency-injection/src/main.ts
index bf6732fff7..a9ca1caf8c 100644
--- a/aio/content/examples/dependency-injection/src/main.ts
+++ b/aio/content/examples/dependency-injection/src/main.ts
@@ -8,6 +8,4 @@ if (environment.production) {
enableProdMode();
}
-// #docregion bootstrap
platformBrowserDynamic().bootstrapModule(AppModule);
-// #enddocregion bootstrap
diff --git a/aio/content/examples/displaying-data/src/app/app-ctor.component.1.ts b/aio/content/examples/displaying-data/src/app/app-ctor.component.1.ts
index aa696a3d63..12b586cb7a 100644
--- a/aio/content/examples/displaying-data/src/app/app-ctor.component.1.ts
+++ b/aio/content/examples/displaying-data/src/app/app-ctor.component.1.ts
@@ -7,7 +7,6 @@ import { Component } from '@angular/core';
My favorite hero is: {{myHero}}
`
})
-// #docregion class
export class AppComponent {
title: string;
myHero: string;
diff --git a/aio/content/examples/displaying-data/src/app/app.component.1.ts b/aio/content/examples/displaying-data/src/app/app.component.1.ts
index 674ac5622b..349f7028ae 100644
--- a/aio/content/examples/displaying-data/src/app/app.component.1.ts
+++ b/aio/content/examples/displaying-data/src/app/app.component.1.ts
@@ -1,14 +1,11 @@
-// #docregion
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
- // #docregion template
template: `
{{title}}
My favorite hero is: {{myHero}}
`
- // #enddocregion template
})
export class AppComponent {
title = 'Tour of Heroes';
diff --git a/aio/content/examples/displaying-data/src/app/app.component.2.ts b/aio/content/examples/displaying-data/src/app/app.component.2.ts
index 4d4e2d50e5..7b70d6ac1e 100644
--- a/aio/content/examples/displaying-data/src/app/app.component.2.ts
+++ b/aio/content/examples/displaying-data/src/app/app.component.2.ts
@@ -1,24 +1,18 @@
-// #docregion
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
- // #docregion template
template: `
{{title}}
My favorite hero is: {{myHero}}
Heroes:
- // #docregion li
-
{{ hero }}
- // #enddocregion li
`
- // #enddocregion template
})
-// #docregion class
export class AppComponent {
title = 'Tour of Heroes';
heroes = ['Windstorm', 'Bombasto', 'Magneta', 'Tornado'];
diff --git a/aio/content/examples/displaying-data/src/app/app.component.3.ts b/aio/content/examples/displaying-data/src/app/app.component.3.ts
index 435a9be767..c3ebc5c090 100644
--- a/aio/content/examples/displaying-data/src/app/app.component.3.ts
+++ b/aio/content/examples/displaying-data/src/app/app.component.3.ts
@@ -1,13 +1,9 @@
-// #docregion
import { Component } from '@angular/core';
-// #docregion import
import { Hero } from './hero';
-// #enddocregion import
@Component({
selector: 'app-root',
- // #docregion template
template: `
{{title}}
My favorite hero is: {{myHero.name}}
@@ -18,12 +14,9 @@ import { Hero } from './hero';
`
- // #enddocregion template
})
-// #docregion class
export class AppComponent {
title = 'Tour of Heroes';
- // #docregion heroes
heroes = [
new Hero(1, 'Windstorm'),
new Hero(13, 'Bombasto'),
@@ -31,5 +24,4 @@ export class AppComponent {
new Hero(20, 'Tornado')
];
myHero = this.heroes[0];
- // #enddocregion heroes
}
diff --git a/aio/content/examples/displaying-data/src/app/app.component.ts b/aio/content/examples/displaying-data/src/app/app.component.ts
index a03f3de1dd..de95f0adbb 100644
--- a/aio/content/examples/displaying-data/src/app/app.component.ts
+++ b/aio/content/examples/displaying-data/src/app/app.component.ts
@@ -1,5 +1,3 @@
-// #docplaster
-// #docregion final
import { Component } from '@angular/core';
import { Hero } from './hero';
@@ -15,9 +13,7 @@ import { Hero } from './hero';
{{ hero.name }}
- // #docregion message
3">There are many heroes!
- // #enddocregion message
`
})
export class AppComponent {
diff --git a/aio/content/examples/displaying-data/src/app/hero.ts b/aio/content/examples/displaying-data/src/app/hero.ts
index f89d26ad63..27671db0bb 100644
--- a/aio/content/examples/displaying-data/src/app/hero.ts
+++ b/aio/content/examples/displaying-data/src/app/hero.ts
@@ -1,9 +1,5 @@
-// #docregion
export class Hero {
constructor(
- // #docregion id
public id: number,
- // #enddocregion id
public name: string) { }
}
-// #enddocregion
diff --git a/aio/content/examples/displaying-data/src/index.html b/aio/content/examples/displaying-data/src/index.html
index 3e5cbf7bea..6f42a6a510 100644
--- a/aio/content/examples/displaying-data/src/index.html
+++ b/aio/content/examples/displaying-data/src/index.html
@@ -7,10 +7,7 @@
-
-
-