style(docs-infra): fix docs examples for tslint rule `import-spacing` (#38143)
This commit updates the docs examples to be compatible with the `import-spacing` tslint rule. This is in preparation of updating the docs examples `tslint.json` to match the one generated for new Angular CLI apps in a future commit. PR Close #38143
This commit is contained in:
parent
d89200ad24
commit
0a791e4a50
|
@ -1,6 +1,6 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import { MovieListComponent } from './movie-list.component';
|
import { MovieListComponent } from './movie-list.component';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ BrowserModule ],
|
imports: [ BrowserModule ],
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { MovieListComponent } from './movie-list.component';
|
import { MovieListComponent } from './movie-list.component';
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
// #docregion imports
|
// #docregion imports
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
// #enddocregion imports
|
// #enddocregion imports
|
||||||
import { HeroDetailComponent } from './hero-detail.component';
|
import { HeroDetailComponent } from './hero-detail.component';
|
||||||
import { HeroListComponent } from './hero-list.component';
|
import { HeroListComponent } from './hero-list.component';
|
||||||
import { SalesTaxComponent } from './sales-tax.component';
|
import { SalesTaxComponent } from './sales-tax.component';
|
||||||
import { HeroService } from './hero.service';
|
import { HeroService } from './hero.service';
|
||||||
import { BackendService } from './backend.service';
|
import { BackendService } from './backend.service';
|
||||||
import { Logger } from './logger.service';
|
import { Logger } from './logger.service';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
import { HeroService } from './hero.service';
|
import { HeroService } from './hero.service';
|
||||||
|
|
||||||
// #docregion metadata, providers
|
// #docregion metadata, providers
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -22,7 +22,7 @@ export class AppComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
// #docregion module
|
// #docregion module
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
// #docregion import-browser-module
|
// #docregion import-browser-module
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
// #enddocregion import-browser-module
|
// #enddocregion import-browser-module
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { SalesTaxService } from './sales-tax.service';
|
import { SalesTaxService } from './sales-tax.service';
|
||||||
import { TaxRateService } from './tax-rate.service';
|
import { TaxRateService } from './tax-rate.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-sales-tax',
|
selector: 'app-sales-tax',
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppComponent } from './app.component.1';
|
import { AppComponent } from './app.component.1';
|
||||||
import { HighlightDirective as HLD1 } from './highlight.directive.1';
|
import { HighlightDirective as HLD1 } from './highlight.directive.1';
|
||||||
import { HighlightDirective as HLD2 } from './highlight.directive.2';
|
import { HighlightDirective as HLD2 } from './highlight.directive.2';
|
||||||
import { HighlightDirective as HLD3 } from './highlight.directive.3';
|
import { HighlightDirective as HLD3 } from './highlight.directive.3';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { AstronautComponent } from './astronaut.component';
|
import { AstronautComponent } from './astronaut.component';
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { Component, Input, OnDestroy } from '@angular/core';
|
import { Component, Input, OnDestroy } from '@angular/core';
|
||||||
|
|
||||||
import { MissionService } from './mission.service';
|
import { MissionService } from './mission.service';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-astronaut',
|
selector: 'app-astronaut',
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// #docregion vc
|
// #docregion vc
|
||||||
import { AfterViewInit, ViewChild } from '@angular/core';
|
import { AfterViewInit, ViewChild } from '@angular/core';
|
||||||
// #docregion lv
|
// #docregion lv
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { CountdownTimerComponent } from './countdown-timer.component';
|
import { CountdownTimerComponent } from './countdown-timer.component';
|
||||||
|
|
||||||
// #enddocregion lv
|
// #enddocregion lv
|
||||||
// #enddocregion vc
|
// #enddocregion vc
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MissionService {
|
export class MissionService {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { MissionService } from './mission.service';
|
import { MissionService } from './mission.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-mission-control',
|
selector: 'app-mission-control',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-vote-taker',
|
selector: 'app-vote-taker',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
const routes: Routes = [];
|
const routes: Routes = [];
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
// #docregion import-services
|
// #docregion import-services
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
import { UserContextService } from './user-context.service';
|
import { UserContextService } from './user-context.service';
|
||||||
import { UserService } from './user.service';
|
import { UserService } from './user.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
|
|
||||||
// import { AppRoutingModule } from './app-routing.module';
|
// import { AppRoutingModule } from './app-routing.module';
|
||||||
import { LocationStrategy,
|
import { LocationStrategy,
|
||||||
HashLocationStrategy } from '@angular/common';
|
HashLocationStrategy } from '@angular/common';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
|
|
||||||
import { HeroData } from './hero-data';
|
import { HeroData } from './hero-data';
|
||||||
import { InMemoryWebApiModule } from 'angular-in-memory-web-api';
|
import { InMemoryWebApiModule } from 'angular-in-memory-web-api';
|
||||||
|
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { HeroBioComponent } from './hero-bio.component';
|
import { HeroBioComponent } from './hero-bio.component';
|
||||||
import { HeroBiosComponent,
|
import { HeroBiosComponent,
|
||||||
HeroBiosAndContactsComponent } from './hero-bios.component';
|
HeroBiosAndContactsComponent } from './hero-bios.component';
|
||||||
import { HeroOfTheMonthComponent } from './hero-of-the-month.component';
|
import { HeroOfTheMonthComponent } from './hero-of-the-month.component';
|
||||||
import { HeroContactComponent } from './hero-contact.component';
|
import { HeroContactComponent } from './hero-contact.component';
|
||||||
import { HeroesBaseComponent,
|
import { HeroesBaseComponent,
|
||||||
SortedHeroesComponent } from './sorted-heroes.component';
|
SortedHeroesComponent } from './sorted-heroes.component';
|
||||||
import { HighlightDirective } from './highlight.directive';
|
import { HighlightDirective } from './highlight.directive';
|
||||||
import { ParentFinderComponent,
|
import { ParentFinderComponent,
|
||||||
AlexComponent,
|
AlexComponent,
|
||||||
AliceComponent,
|
AliceComponent,
|
||||||
|
@ -30,8 +30,8 @@ import { ParentFinderComponent,
|
||||||
CathyComponent,
|
CathyComponent,
|
||||||
BarryComponent,
|
BarryComponent,
|
||||||
BethComponent,
|
BethComponent,
|
||||||
BobComponent } from './parent-finder.component';
|
BobComponent } from './parent-finder.component';
|
||||||
import { StorageComponent } from './storage.component';
|
import { StorageComponent } from './storage.component';
|
||||||
|
|
||||||
const declarations = [
|
const declarations = [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* tslint:disable:one-line*/
|
/* tslint:disable:one-line*/
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { HeroCacheService } from './hero-cache.service';
|
import { HeroCacheService } from './hero-cache.service';
|
||||||
|
|
||||||
// #docregion component
|
// #docregion component
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { HeroService } from './hero.service';
|
import { HeroService } from './hero.service';
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
|
|
||||||
//////// HeroBiosComponent ////
|
//////// HeroBiosComponent ////
|
||||||
// #docregion simple
|
// #docregion simple
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
import { HeroService } from './hero.service';
|
import { HeroService } from './hero.service';
|
||||||
|
|
||||||
// #docregion service
|
// #docregion service
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { Component, Host, Optional } from '@angular/core';
|
import { Component, Host, Optional } from '@angular/core';
|
||||||
|
|
||||||
import { HeroCacheService } from './hero-cache.service';
|
import { HeroCacheService } from './hero-cache.service';
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
|
|
||||||
// #docregion component
|
// #docregion component
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Illustrative (not used), mini-version of the actual HeroOfTheMonthComponent
|
// Illustrative (not used), mini-version of the actual HeroOfTheMonthComponent
|
||||||
// Injecting with the MinimalLogger "interface-class"
|
// Injecting with the MinimalLogger "interface-class"
|
||||||
import { Component, NgModule } from '@angular/core';
|
import { Component, NgModule } from '@angular/core';
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
import { MinimalLogger } from './minimal-logger.service';
|
import { MinimalLogger } from './minimal-logger.service';
|
||||||
|
|
||||||
// #docregion
|
// #docregion
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -10,12 +10,12 @@ export const TITLE = new InjectionToken<string>('title');
|
||||||
import { Component, Inject } from '@angular/core';
|
import { Component, Inject } from '@angular/core';
|
||||||
|
|
||||||
import { DateLoggerService } from './date-logger.service';
|
import { DateLoggerService } from './date-logger.service';
|
||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
import { HeroService } from './hero.service';
|
import { HeroService } from './hero.service';
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
import { MinimalLogger } from './minimal-logger.service';
|
import { MinimalLogger } from './minimal-logger.service';
|
||||||
import { RUNNERS_UP,
|
import { RUNNERS_UP,
|
||||||
runnersUpFactory } from './runners-up';
|
runnersUpFactory } from './runners-up';
|
||||||
|
|
||||||
// #enddocregion hero-of-the-month
|
// #enddocregion hero-of-the-month
|
||||||
// #docregion some-hero
|
// #docregion some-hero
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { InjectionToken } from '@angular/core';
|
import { InjectionToken } from '@angular/core';
|
||||||
|
|
||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
import { HeroService } from './hero.service';
|
import { HeroService } from './hero.service';
|
||||||
|
|
||||||
// #docregion runners-up
|
// #docregion runners-up
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
import { HeroService } from './hero.service';
|
import { HeroService } from './hero.service';
|
||||||
|
|
||||||
/////// HeroesBaseComponent /////
|
/////// HeroesBaseComponent /////
|
||||||
// #docregion heroes-base, injection
|
// #docregion heroes-base, injection
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
import { UserService } from './user.service';
|
import { UserService } from './user.service';
|
||||||
|
|
||||||
// #docregion injectables, injectable
|
// #docregion injectables, injectable
|
||||||
@Injectable({
|
@Injectable({
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// #docregion imports
|
// #docregion imports
|
||||||
import { Component, Inject } from '@angular/core';
|
import { Component, Inject } from '@angular/core';
|
||||||
|
|
||||||
import { APP_CONFIG, AppConfig } from './app.config';
|
import { APP_CONFIG, AppConfig } from './app.config';
|
||||||
// #enddocregion imports
|
// #enddocregion imports
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { APP_CONFIG, HERO_DI_CONFIG } from './app.config';
|
import { APP_CONFIG, HERO_DI_CONFIG } from './app.config';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { CarComponent } from './car/car.component';
|
import { CarComponent } from './car/car.component';
|
||||||
import { HeroesComponent } from './heroes/heroes.component';
|
import { HeroesComponent } from './heroes/heroes.component';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injector } from '@angular/core';
|
import { Injector } from '@angular/core';
|
||||||
|
|
||||||
import { Car, Engine, Tires } from './car';
|
import { Car, Engine, Tires } from './car';
|
||||||
import { Logger } from '../logger.service';
|
import { Logger } from '../logger.service';
|
||||||
|
|
||||||
// #docregion injector
|
// #docregion injector
|
||||||
export function useInjector() {
|
export function useInjector() {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { Car, Engine, Tires } from './car';
|
import { Car, Engine, Tires } from './car';
|
||||||
import { Car as CarNoDi } from './car-no-di';
|
import { Car as CarNoDi } from './car-no-di';
|
||||||
import { CarFactory } from './car-factory';
|
import { CarFactory } from './car-factory';
|
||||||
|
|
||||||
import { testCar,
|
import { testCar,
|
||||||
simpleCar,
|
simpleCar,
|
||||||
superCar } from './car-creations';
|
superCar } from './car-creations';
|
||||||
|
|
||||||
import { useInjector } from './car-injector';
|
import { useInjector } from './car-injector';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { HEROES } from './mock-heroes';
|
import { HEROES } from './mock-heroes';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-hero-list',
|
selector: 'app-hero-list',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
import { HeroService } from './hero.service.1';
|
import { HeroService } from './hero.service.1';
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* tslint:disable:one-line */
|
/* tslint:disable:one-line */
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
import { HeroService } from './hero.service';
|
import { HeroService } from './hero.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HEROES } from './mock-heroes';
|
import { HEROES } from './mock-heroes';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HEROES } from './mock-heroes';
|
import { HEROES } from './mock-heroes';
|
||||||
import { Logger } from '../logger.service';
|
import { Logger } from '../logger.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* tslint:disable:one-line */
|
/* tslint:disable:one-line */
|
||||||
// #docregion
|
// #docregion
|
||||||
import { HeroService } from './hero.service';
|
import { HeroService } from './hero.service';
|
||||||
import { Logger } from '../logger.service';
|
import { Logger } from '../logger.service';
|
||||||
import { UserService } from '../user.service';
|
import { UserService } from '../user.service';
|
||||||
|
|
||||||
// #docregion factory
|
// #docregion factory
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HEROES } from './mock-heroes';
|
import { HEROES } from './mock-heroes';
|
||||||
import { Logger } from '../logger.service';
|
import { Logger } from '../logger.service';
|
||||||
import { UserService } from '../user.service';
|
import { UserService } from '../user.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { heroServiceProvider } from './hero.service.provider';
|
import { heroServiceProvider } from './hero.service.provider';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, Injector, OnInit } from '@angular/core';
|
import { Component, Injector, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { Car, Engine, Tires } from './car/car';
|
import { Car, Engine, Tires } from './car/car';
|
||||||
import { Hero } from './heroes/hero';
|
import { Hero } from './heroes/hero';
|
||||||
import { HeroService } from './heroes/hero.service';
|
import { HeroService } from './heroes/hero.service';
|
||||||
import { heroServiceProvider } from './heroes/hero.service.provider';
|
import { heroServiceProvider } from './heroes/hero.service.provider';
|
||||||
import { Logger } from './logger.service';
|
import { Logger } from './logger.service';
|
||||||
|
|
||||||
// #docregion injector
|
// #docregion injector
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { ServiceModule } from './service-and-module';
|
import { ServiceModule } from './service-and-module';
|
||||||
|
|
||||||
// #docregion
|
// #docregion
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
|
||||||
// #docregion class
|
// #docregion class
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { Component, Input, OnInit, ViewChild, ComponentFactoryResolver, OnDestroy } from '@angular/core';
|
import { Component, Input, OnInit, ViewChild, ComponentFactoryResolver, OnDestroy } from '@angular/core';
|
||||||
|
|
||||||
import { AdDirective } from './ad.directive';
|
import { AdDirective } from './ad.directive';
|
||||||
import { AdItem } from './ad-item';
|
import { AdItem } from './ad-item';
|
||||||
import { AdComponent } from './ad.component';
|
import { AdComponent } from './ad.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { HeroJobAdComponent } from './hero-job-ad.component';
|
import { HeroJobAdComponent } from './hero-job-ad.component';
|
||||||
import { HeroProfileComponent } from './hero-profile.component';
|
import { HeroProfileComponent } from './hero-profile.component';
|
||||||
import { AdItem } from './ad-item';
|
import { AdItem } from './ad-item';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AdService {
|
export class AdService {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { AdService } from './ad.service';
|
import { AdService } from './ad.service';
|
||||||
import { AdItem } from './ad-item';
|
import { AdItem } from './ad-item';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { HeroJobAdComponent } from './hero-job-ad.component';
|
import { HeroJobAdComponent } from './hero-job-ad.component';
|
||||||
import { AdBannerComponent } from './ad-banner.component';
|
import { AdBannerComponent } from './ad-banner.component';
|
||||||
import { HeroProfileComponent } from './hero-profile.component';
|
import { HeroProfileComponent } from './hero-profile.component';
|
||||||
import { AdDirective } from './ad.directive';
|
import { AdDirective } from './ad.directive';
|
||||||
import { AdService } from './ad.service';
|
import { AdService } from './ad.service';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ BrowserModule ],
|
imports: [ BrowserModule ],
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
|
|
||||||
import { AdComponent } from './ad.component';
|
import { AdComponent } from './ad.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `
|
template: `
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
|
|
||||||
import { AdComponent } from './ad.component';
|
import { AdComponent } from './ad.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `
|
template: `
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { QuestionService } from './question.service';
|
import { QuestionService } from './question.service';
|
||||||
import { QuestionBase } from './question-base';
|
import { QuestionBase } from './question-base';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { ReactiveFormsModule } from '@angular/forms';
|
import { ReactiveFormsModule } from '@angular/forms';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { DynamicFormComponent } from './dynamic-form.component';
|
import { DynamicFormComponent } from './dynamic-form.component';
|
||||||
import { DynamicFormQuestionComponent } from './dynamic-form-question.component';
|
import { DynamicFormQuestionComponent } from './dynamic-form-question.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { FormGroup } from '@angular/forms';
|
import { FormGroup } from '@angular/forms';
|
||||||
|
|
||||||
import { QuestionBase } from './question-base';
|
import { QuestionBase } from './question-base';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-question',
|
selector: 'app-question',
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { FormGroup } from '@angular/forms';
|
import { FormGroup } from '@angular/forms';
|
||||||
|
|
||||||
import { QuestionBase } from './question-base';
|
import { QuestionBase } from './question-base';
|
||||||
import { QuestionControlService } from './question-control.service';
|
import { QuestionControlService } from './question-control.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dynamic-form',
|
selector: 'app-dynamic-form',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
|
|
||||||
import { QuestionBase } from './question-base';
|
import { QuestionBase } from './question-base';
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { DropdownQuestion } from './question-dropdown';
|
import { DropdownQuestion } from './question-dropdown';
|
||||||
import { QuestionBase } from './question-base';
|
import { QuestionBase } from './question-base';
|
||||||
import { TextboxQuestion } from './question-textbox';
|
import { TextboxQuestion } from './question-textbox';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { HeroFormTemplateComponent } from './template/hero-form-template.component';
|
import { HeroFormTemplateComponent } from './template/hero-form-template.component';
|
||||||
import { HeroFormReactiveComponent } from './reactive/hero-form-reactive.component';
|
import { HeroFormReactiveComponent } from './reactive/hero-form-reactive.component';
|
||||||
import { ForbiddenValidatorDirective } from './shared/forbidden-name.directive';
|
import { ForbiddenValidatorDirective } from './shared/forbidden-name.directive';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* tslint:disable: member-ordering forin */
|
/* tslint:disable: member-ordering forin */
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import { forbiddenNameValidator } from '../shared/forbidden-name.directive';
|
import { forbiddenNameValidator } from '../shared/forbidden-name.directive';
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { HeroFormComponent } from './hero-form/hero-form.component';
|
import { HeroFormComponent } from './hero-form/hero-form.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { HeroTaxReturnComponent } from './hero-tax-return.component';
|
import { HeroTaxReturnComponent } from './hero-tax-return.component';
|
||||||
import { HeroesListComponent } from './heroes-list.component';
|
import { HeroesListComponent } from './heroes-list.component';
|
||||||
import { VillainsListComponent } from './villains-list.component';
|
import { VillainsListComponent } from './villains-list.component';
|
||||||
|
|
||||||
import { carComponents } from './car.components';
|
import { carComponents } from './car.components';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { HeroTaxReturn } from './hero';
|
import { HeroTaxReturn } from './hero';
|
||||||
import { HeroTaxReturnService } from './hero-tax-return.service';
|
import { HeroTaxReturnService } from './hero-tax-return.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HeroTaxReturn } from './hero';
|
import { HeroTaxReturn } from './hero';
|
||||||
import { HeroesService } from './heroes.service';
|
import { HeroesService } from './heroes.service';
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
import { Hero, HeroTaxReturn } from './hero';
|
import { Hero, HeroTaxReturn } from './hero';
|
||||||
import { HeroesService } from './heroes.service';
|
import { HeroesService } from './heroes.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-heroes-list',
|
selector: 'app-heroes-list',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
import { Villain, VillainsService } from './villains.service';
|
import { Villain, VillainsService } from './villains.service';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
export interface Villain { id: number; name: string; }
|
export interface Villain { id: number; name: string; }
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion sketch
|
// #docregion sketch
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
// #enddocregion sketch
|
// #enddocregion sketch
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
// #docregion sketch
|
// #docregion sketch
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
// #enddocregion sketch
|
// #enddocregion sketch
|
||||||
import { HttpClientXsrfModule } from '@angular/common/http';
|
import { HttpClientXsrfModule } from '@angular/common/http';
|
||||||
|
|
||||||
import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';
|
import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';
|
||||||
import { InMemoryDataService } from './in-memory-data.service';
|
import { InMemoryDataService } from './in-memory-data.service';
|
||||||
|
|
||||||
import { RequestCache, RequestCacheWithMap } from './request-cache.service';
|
import { RequestCache, RequestCacheWithMap } from './request-cache.service';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { AuthService } from './auth.service';
|
import { AuthService } from './auth.service';
|
||||||
import { ConfigComponent } from './config/config.component';
|
import { ConfigComponent } from './config/config.component';
|
||||||
import { DownloaderComponent } from './downloader/downloader.component';
|
import { DownloaderComponent } from './downloader/downloader.component';
|
||||||
import { HeroesComponent } from './heroes/heroes.component';
|
import { HeroesComponent } from './heroes/heroes.component';
|
||||||
import { HttpErrorHandler } from './http-error-handler.service';
|
import { HttpErrorHandler } from './http-error-handler.service';
|
||||||
import { MessageService } from './message.service';
|
import { MessageService } from './message.service';
|
||||||
import { MessagesComponent } from './messages/messages.component';
|
import { MessagesComponent } from './messages/messages.component';
|
||||||
import { PackageSearchComponent } from './package-search/package-search.component';
|
import { PackageSearchComponent } from './package-search/package-search.component';
|
||||||
import { UploaderComponent } from './uploader/uploader.component';
|
import { UploaderComponent } from './uploader/uploader.component';
|
||||||
|
|
||||||
import { httpInterceptorProviders } from './http-interceptors/index';
|
import { httpInterceptorProviders } from './http-interceptors/index';
|
||||||
// #docregion sketch
|
// #docregion sketch
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { AfterContentChecked, AfterContentInit, Component, ContentChild } from '@angular/core';
|
import { AfterContentChecked, AfterContentInit, Component, ContentChild } from '@angular/core';
|
||||||
|
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
|
|
||||||
//////////////////
|
//////////////////
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { AfterViewChecked, AfterViewInit, Component, ViewChild } from '@angular/core';
|
import { AfterViewChecked, AfterViewInit, Component, ViewChild } from '@angular/core';
|
||||||
|
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
|
|
||||||
//////////////////
|
//////////////////
|
||||||
// #docregion child-view
|
// #docregion child-view
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {
|
||||||
OnChanges, SimpleChanges,
|
OnChanges, SimpleChanges,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-counter',
|
selector: 'app-counter',
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
SimpleChanges
|
SimpleChanges
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
|
|
||||||
let nextId = 1;
|
let nextId = 1;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'spy-parent',
|
selector: 'spy-parent',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import { ContactComponent } from './contact.component';
|
import { ContactComponent } from './contact.component';
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ path: 'contact', component: ContactComponent}
|
{ path: 'contact', component: ContactComponent}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Exact copy except import UserService from greeting
|
// Exact copy except import UserService from greeting
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { FormBuilder, Validators } from '@angular/forms';
|
import { FormBuilder, Validators } from '@angular/forms';
|
||||||
|
|
||||||
import { Contact, ContactService } from './contact.service';
|
import { Contact, ContactService } from './contact.service';
|
||||||
import { UserService } from '../greeting/user.service';
|
import { UserService } from '../greeting/user.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-contact',
|
selector: 'app-contact',
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { SharedModule } from '../shared/shared.module';
|
import { SharedModule } from '../shared/shared.module';
|
||||||
import { ReactiveFormsModule } from '@angular/forms';
|
import { ReactiveFormsModule } from '@angular/forms';
|
||||||
|
|
||||||
import { ContactComponent } from './contact.component';
|
import { ContactComponent } from './contact.component';
|
||||||
import { ContactService } from './contact.service';
|
import { ContactService } from './contact.service';
|
||||||
import { ContactRoutingModule } from './contact-routing.module';
|
import { ContactRoutingModule } from './contact-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injectable, OnDestroy } from '@angular/core';
|
import { Injectable, OnDestroy } from '@angular/core';
|
||||||
|
|
||||||
import { Observable, of } from 'rxjs';
|
import { Observable, of } from 'rxjs';
|
||||||
import { delay } from 'rxjs/operators';
|
import { delay } from 'rxjs/operators';
|
||||||
|
|
||||||
export class Contact {
|
export class Contact {
|
||||||
constructor(public id: number, public name: string) { }
|
constructor(public id: number, public name: string) { }
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
|
||||||
import { Customer,
|
import { Customer,
|
||||||
CustomersService } from './customers.service';
|
CustomersService } from './customers.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `
|
template: `
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes,
|
import { Routes,
|
||||||
RouterModule } from '@angular/router';
|
RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import { CustomersComponent } from './customers.component';
|
import { CustomersComponent } from './customers.component';
|
||||||
import { CustomersListComponent } from './customers-list.component';
|
import { CustomersListComponent } from './customers-list.component';
|
||||||
import { CustomersDetailComponent } from './customers-detail.component';
|
import { CustomersDetailComponent } from './customers-detail.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { CustomersService } from './customers.service';
|
import { CustomersService } from './customers.service';
|
||||||
import { UserService } from '../greeting/user.service';
|
import { UserService } from '../greeting/user.service';
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
|
|
||||||
import { SharedModule } from '../shared/shared.module';
|
import { SharedModule } from '../shared/shared.module';
|
||||||
|
|
||||||
import { CustomersComponent } from './customers.component';
|
import { CustomersComponent } from './customers.component';
|
||||||
import { CustomersDetailComponent } from './customers-detail.component';
|
import { CustomersDetailComponent } from './customers-detail.component';
|
||||||
import { CustomersListComponent } from './customers-list.component';
|
import { CustomersListComponent } from './customers-list.component';
|
||||||
import { CustomersRoutingModule } from './customers-routing.module';
|
import { CustomersRoutingModule } from './customers-routing.module';
|
||||||
import { CustomersService } from './customers.service';
|
import { CustomersService } from './customers.service';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injectable, OnDestroy } from '@angular/core';
|
import { Injectable, OnDestroy } from '@angular/core';
|
||||||
|
|
||||||
import { Observable, of } from 'rxjs';
|
import { Observable, of } from 'rxjs';
|
||||||
import { delay } from 'rxjs/operators';
|
import { delay } from 'rxjs/operators';
|
||||||
|
|
||||||
export class Customer {
|
export class Customer {
|
||||||
constructor(public id: number, public name: string) { }
|
constructor(public id: number, public name: string) { }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { UserService } from '../greeting/user.service';
|
import { UserService } from '../greeting/user.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-greeting',
|
selector: 'app-greeting',
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
|
||||||
import { Item,
|
import { Item,
|
||||||
ItemService } from './items.service';
|
ItemService } from './items.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `
|
template: `
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { Observable }from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
import { Item,
|
import { Item, ItemService } from './items.service';
|
||||||
ItemService } from './items.service';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `
|
template: `
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes,
|
import { Routes,
|
||||||
RouterModule } from '@angular/router';
|
RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import { ItemsListComponent } from './items-list.component';
|
import { ItemsListComponent } from './items-list.component';
|
||||||
import { ItemsDetailComponent } from './items-detail.component';
|
import { ItemsDetailComponent } from './items-detail.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', redirectTo: 'list', pathMatch: 'full'},
|
{ path: '', redirectTo: 'list', pathMatch: 'full'},
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import { ItemsComponent } from './items.component';
|
import { ItemsComponent } from './items.component';
|
||||||
import { ItemsListComponent } from './items-list.component';
|
import { ItemsListComponent } from './items-list.component';
|
||||||
import { ItemsDetailComponent } from './items-detail.component';
|
import { ItemsDetailComponent } from './items-detail.component';
|
||||||
import { ItemService } from './items.service';
|
import { ItemService } from './items.service';
|
||||||
import { ItemsRoutingModule } from './items-routing.module';
|
import { ItemsRoutingModule } from './items-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ CommonModule, ItemsRoutingModule ],
|
imports: [ CommonModule, ItemsRoutingModule ],
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Injectable, OnDestroy } from '@angular/core';
|
import { Injectable, OnDestroy } from '@angular/core';
|
||||||
|
|
||||||
import { Observable, of } from 'rxjs';
|
import { Observable, of } from 'rxjs';
|
||||||
import { delay } from 'rxjs/operators';
|
import { delay } from 'rxjs/operators';
|
||||||
|
|
||||||
export class Item {
|
export class Item {
|
||||||
constructor(public id: number, public name: string) { }
|
constructor(public id: number, public name: string) { }
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
import { AwesomePipe } from './awesome.pipe';
|
import { AwesomePipe } from './awesome.pipe';
|
||||||
import { HighlightDirective } from './highlight.directive';
|
import { HighlightDirective } from './highlight.directive';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ CommonModule ],
|
imports: [ CommonModule ],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
|
|
||||||
// #docregion pipe-metadata
|
// #docregion pipe-metadata
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { HEROES } from './heroes';
|
import { HEROES } from './heroes';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-flying-heroes',
|
selector: 'app-flying-heroes',
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-admin-dashboard',
|
selector: 'app-admin-dashboard',
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
import { SelectivePreloadingStrategyService } from '../../selective-preloading-strategy.service';
|
import { SelectivePreloadingStrategyService } from '../../selective-preloading-strategy.service';
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
|
||||||
import { AdminComponent } from './admin/admin.component';
|
import { AdminComponent } from './admin/admin.component';
|
||||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||||
|
|
||||||
// #docregion admin-routes
|
// #docregion admin-routes
|
||||||
const adminRoutes: Routes = [
|
const adminRoutes: Routes = [
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
|
||||||
import { AdminComponent } from './admin/admin.component';
|
import { AdminComponent } from './admin/admin.component';
|
||||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||||
|
|
||||||
// #docregion admin-route
|
// #docregion admin-route
|
||||||
import { AuthGuard } from '../auth/auth.guard';
|
import { AuthGuard } from '../auth/auth.guard';
|
||||||
|
|
||||||
const adminRoutes: Routes = [
|
const adminRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
|
||||||
import { AdminComponent } from './admin/admin.component';
|
import { AdminComponent } from './admin/admin.component';
|
||||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||||
|
|
||||||
// #docregion admin-route
|
// #docregion admin-route
|
||||||
import { AuthGuard } from '../auth/auth.guard';
|
import { AuthGuard } from '../auth/auth.guard';
|
||||||
|
|
||||||
// #docregion can-activate-child
|
// #docregion can-activate-child
|
||||||
const adminRoutes: Routes = [
|
const adminRoutes: Routes = [
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
|
||||||
import { AdminComponent } from './admin/admin.component';
|
import { AdminComponent } from './admin/admin.component';
|
||||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||||
|
|
||||||
import { AuthGuard } from '../auth/auth.guard';
|
import { AuthGuard } from '../auth/auth.guard';
|
||||||
|
|
||||||
const adminRoutes: Routes = [
|
const adminRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import { AdminComponent } from './admin/admin.component';
|
import { AdminComponent } from './admin/admin.component';
|
||||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||||
|
|
||||||
import { AdminRoutingModule } from './admin-routing.module';
|
import { AdminRoutingModule } from './admin-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
|
||||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||||
|
|
||||||
// #docregion appRoutes
|
// #docregion appRoutes
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
// #docregion milestone3
|
// #docregion milestone3
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
|
||||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||||
// #enddocregion milestone3
|
// #enddocregion milestone3
|
||||||
// import { HeroListComponent } from './hero-list/hero-list.component'; // <-- delete this line
|
// import { HeroListComponent } from './hero-list/hero-list.component'; // <-- delete this line
|
||||||
// #docregion milestone3
|
// #docregion milestone3
|
||||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion , v3
|
// #docregion , v3
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
|
||||||
// #enddocregion v3
|
// #enddocregion v3
|
||||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||||
// #docregion v3
|
// #docregion v3
|
||||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||||
|
|
||||||
const appRoutes: Routes = [
|
const appRoutes: Routes = [
|
||||||
// #enddocregion v3
|
// #enddocregion v3
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue