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:

committed by
Alex Rickabaugh

parent
4c2cdc682b
commit
24498eb416
@ -1,8 +1,8 @@
|
||||
// #docregion
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'app-admin-dashboard',
|
||||
|
@ -1,8 +1,8 @@
|
||||
// #docregion
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { SelectivePreloadingStrategyService } from '../../selective-preloading-strategy.service';
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { AdminComponent } from './admin/admin.component';
|
||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
import { AdminComponent } from './admin/admin.component';
|
||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
|
||||
// #docregion admin-routes
|
||||
const adminRoutes: Routes = [
|
||||
|
@ -1,15 +1,15 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { AdminComponent } from './admin/admin.component';
|
||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
import { AdminComponent } from './admin/admin.component';
|
||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
|
||||
// #docregion admin-route
|
||||
import { AuthGuard } from '../auth/auth.guard';
|
||||
import { AuthGuard } from '../auth/auth.guard';
|
||||
|
||||
const adminRoutes: Routes = [
|
||||
{
|
||||
|
@ -1,15 +1,15 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { AdminComponent } from './admin/admin.component';
|
||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
import { AdminComponent } from './admin/admin.component';
|
||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
|
||||
// #docregion admin-route
|
||||
import { AuthGuard } from '../auth/auth.guard';
|
||||
import { AuthGuard } from '../auth/auth.guard';
|
||||
|
||||
// #docregion can-activate-child
|
||||
const adminRoutes: Routes = [
|
||||
|
@ -1,14 +1,14 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { AdminComponent } from './admin/admin.component';
|
||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
import { AdminComponent } from './admin/admin.component';
|
||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
|
||||
import { AuthGuard } from '../auth/auth.guard';
|
||||
import { AuthGuard } from '../auth/auth.guard';
|
||||
|
||||
const adminRoutes: Routes = [
|
||||
{
|
||||
|
@ -1,13 +1,13 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { AdminComponent } from './admin/admin.component';
|
||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
import { AdminComponent } from './admin/admin.component';
|
||||
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
|
||||
import { AdminRoutingModule } from './admin-routing.module';
|
||||
import { AdminRoutingModule } from './admin-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -1,9 +1,9 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
// #docregion appRoutes
|
||||
|
@ -1,11 +1,11 @@
|
||||
// #docregion
|
||||
// #docregion milestone3
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
// #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
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
// #docplaster
|
||||
// #docregion , v3
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
// #enddocregion v3
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
// #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 = [
|
||||
// #enddocregion v3
|
||||
|
@ -1,10 +1,10 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
import { CanDeactivateGuard } from './can-deactivate.guard';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { CanDeactivateGuard } from './can-deactivate.guard';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
{
|
||||
|
@ -1,14 +1,14 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
// #docregion import-router
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
// #enddocregion import-router
|
||||
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
import { AuthGuard } from './auth/auth.guard';
|
||||
import { AuthGuard } from './auth/auth.guard';
|
||||
|
||||
|
||||
const appRoutes: Routes = [
|
||||
|
@ -1,6 +1,6 @@
|
||||
// #docplaster
|
||||
// #docregion, preload-v1
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import {
|
||||
RouterModule, Routes,
|
||||
// #enddocregion preload-v1
|
||||
@ -9,9 +9,9 @@ import {
|
||||
} from '@angular/router';
|
||||
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
import { AuthGuard } from './auth/auth.guard';
|
||||
import { AuthGuard } from './auth/auth.guard';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
// #docplaster
|
||||
// #docregion, preload-v1
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
import { AuthGuard } from './auth/auth.guard';
|
||||
import { AuthGuard } from './auth/auth.guard';
|
||||
import { SelectivePreloadingStrategyService } from './selective-preloading-strategy.service';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* tslint:disable:no-unused-variable */
|
||||
// #docplaster
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
|
@ -1,11 +1,11 @@
|
||||
// NEVER USED. For docs only. Should compile though
|
||||
// #docplaster
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { PageNotFoundComponent as HeroDetailComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
// #docregion
|
||||
|
@ -1,16 +1,16 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
// #docregion first-config
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
// #docregion import-router
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
// #enddocregion import-router
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { AppComponent } from './app.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
// #enddocregion first-config
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
// #docregion first-config
|
||||
|
@ -1,15 +1,15 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
// #docregion hero-import
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
@NgModule({
|
||||
|
@ -1,18 +1,18 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
// #docregion remove-heroes
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
// #enddocregion remove-heroes
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
|
||||
// #docregion remove-heroes
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { HeroesModule } from './heroes/heroes.module';
|
||||
import { HeroesModule } from './heroes/heroes.module';
|
||||
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
@NgModule({
|
||||
|
@ -1,20 +1,20 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
// #docregion crisis-center-module, admin-module
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { HeroesModule } from './heroes/heroes.module';
|
||||
import { CrisisCenterModule } from './crisis-center/crisis-center.module';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { HeroesModule } from './heroes/heroes.module';
|
||||
import { CrisisCenterModule } from './crisis-center/crisis-center.module';
|
||||
// #enddocregion crisis-center-module
|
||||
|
||||
import { AdminModule } from './admin/admin.module';
|
||||
import { AdminModule } from './admin/admin.module';
|
||||
// #docregion crisis-center-module
|
||||
|
||||
@NgModule({
|
||||
|
@ -1,19 +1,19 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
|
||||
import { HeroesModule } from './heroes/heroes.module';
|
||||
import { CrisisCenterModule } from './crisis-center/crisis-center.module';
|
||||
import { HeroesModule } from './heroes/heroes.module';
|
||||
import { CrisisCenterModule } from './crisis-center/crisis-center.module';
|
||||
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
import { AdminModule } from './admin/admin.module';
|
||||
import { AdminModule } from './admin/admin.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -1,10 +1,10 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
const routes: Routes = [
|
||||
|
@ -1,17 +1,17 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { HeroesModule } from './heroes/heroes.module';
|
||||
import { CrisisCenterModule } from './crisis-center/crisis-center.module';
|
||||
import { AuthModule } from './auth/auth.module';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { HeroesModule } from './heroes/heroes.module';
|
||||
import { CrisisCenterModule } from './crisis-center/crisis-center.module';
|
||||
import { AuthModule } from './auth/auth.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -1,8 +1,8 @@
|
||||
// #docplaster
|
||||
// #docregion auth, preload
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
// #docregion animations-module
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
|
||||
@ -12,13 +12,13 @@ import { Router } from '@angular/router';
|
||||
|
||||
// #enddocregion inspect-config
|
||||
// #docregion auth
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { HeroesModule } from './heroes/heroes.module';
|
||||
import { AuthModule } from './auth/auth.module';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { HeroesModule } from './heroes/heroes.module';
|
||||
import { AuthModule } from './auth/auth.module';
|
||||
|
||||
// #docregion animations-module
|
||||
@NgModule({
|
||||
|
@ -1,9 +1,9 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { AuthGuard } from './auth.guard';
|
||||
import { AuthService } from './auth.service';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import { AuthGuard } from './auth.guard';
|
||||
import { AuthService } from './auth.service';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
|
||||
const authRoutes: Routes = [
|
||||
{ path: 'login', component: LoginComponent }
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router, UrlTree } from '@angular/router';
|
||||
|
||||
import { AuthService } from './auth.service';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
@ -1,13 +1,13 @@
|
||||
// #docregion can-activate-child
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
CanActivate, Router,
|
||||
ActivatedRouteSnapshot,
|
||||
RouterStateSnapshot,
|
||||
CanActivateChild,
|
||||
UrlTree
|
||||
} from '@angular/router';
|
||||
import { AuthService } from './auth.service';
|
||||
} from '@angular/router';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
@ -1,6 +1,6 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
CanActivate, Router,
|
||||
ActivatedRouteSnapshot,
|
||||
@ -8,8 +8,8 @@ import {
|
||||
CanActivateChild,
|
||||
NavigationExtras,
|
||||
UrlTree
|
||||
} from '@angular/router';
|
||||
import { AuthService } from './auth.service';
|
||||
} from '@angular/router';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
@ -1,5 +1,5 @@
|
||||
// #docplaster
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
CanActivate, Router,
|
||||
ActivatedRouteSnapshot,
|
||||
@ -7,8 +7,8 @@ import {
|
||||
CanActivateChild,
|
||||
NavigationExtras,
|
||||
CanLoad, Route
|
||||
} from '@angular/router';
|
||||
import { AuthService } from './auth.service';
|
||||
} from '@angular/router';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
@ -1,10 +1,10 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import { AuthRoutingModule } from './auth-routing.module';
|
||||
|
||||
// #docregion v1
|
||||
|
@ -1,9 +1,9 @@
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { CanDeactivate,
|
||||
ActivatedRouteSnapshot,
|
||||
RouterStateSnapshot } from '@angular/router';
|
||||
RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
import { CrisisDetailComponent } from './crisis-center/crisis-detail/crisis-detail.component';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CanDeactivate } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface CanComponentDeactivate {
|
||||
canDeactivate: () => Observable<boolean> | Promise<boolean> | boolean;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// #docregion
|
||||
import { Component, HostBinding } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-compose-message',
|
||||
|
@ -1,12 +1,12 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
|
||||
// #docregion routes
|
||||
const crisisCenterRoutes: Routes = [
|
||||
|
@ -1,19 +1,19 @@
|
||||
// #docplaster
|
||||
// #docregion routes
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
// #enddocregion routes
|
||||
|
||||
// #docregion can-deactivate-guard
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
// #enddocregion can-deactivate-guard
|
||||
// #docregion crisis-detail-resolver
|
||||
import { CrisisDetailResolverService } from './crisis-detail-resolver.service';
|
||||
import { CrisisDetailResolverService } from './crisis-detail-resolver.service';
|
||||
|
||||
// #enddocregion crisis-detail-resolver
|
||||
// #docregion routes
|
||||
|
@ -1,15 +1,15 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
|
||||
// #docregion can-deactivate-guard
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
|
||||
const crisisCenterRoutes: Routes = [
|
||||
{
|
||||
|
@ -1,15 +1,15 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { CrisisDetailResolverService } from './crisis-detail-resolver.service';
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { CrisisDetailResolverService } from './crisis-detail-resolver.service';
|
||||
|
||||
const crisisCenterRoutes: Routes = [
|
||||
{
|
||||
|
@ -1,15 +1,15 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { CrisisDetailResolverService } from './crisis-detail-resolver.service';
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { CrisisDetailResolverService } from './crisis-detail-resolver.service';
|
||||
|
||||
const crisisCenterRoutes: Routes = [
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
|
||||
import { CrisisCenterRoutingModule } from './crisis-center-routing.module';
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Router, Resolve,
|
||||
RouterStateSnapshot,
|
||||
ActivatedRouteSnapshot
|
||||
} from '@angular/router';
|
||||
import { Observable, of, EMPTY } from 'rxjs';
|
||||
import { mergeMap, take } from 'rxjs/operators';
|
||||
} from '@angular/router';
|
||||
import { Observable, of, EMPTY } from 'rxjs';
|
||||
import { mergeMap, take } from 'rxjs/operators';
|
||||
|
||||
import { CrisisService } from './crisis.service';
|
||||
import { CrisisService } from './crisis.service';
|
||||
import { Crisis } from './crisis';
|
||||
|
||||
@Injectable({
|
||||
|
@ -1,13 +1,13 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router, ParamMap } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
import { Observable } from 'rxjs';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
|
||||
import { CrisisService } from '../crisis.service';
|
||||
import { Crisis } from '../crisis';
|
||||
import { DialogService } from '../../dialog.service';
|
||||
import { CrisisService } from '../crisis.service';
|
||||
import { Crisis } from '../crisis';
|
||||
import { DialogService } from '../../dialog.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-crisis-detail',
|
||||
|
@ -4,8 +4,8 @@ import { Component, OnInit, HostBinding } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { Crisis } from '../crisis';
|
||||
import { DialogService } from '../../dialog.service';
|
||||
import { Crisis } from '../crisis';
|
||||
import { DialogService } from '../../dialog.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-crisis-detail',
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, ParamMap } from '@angular/router';
|
||||
|
||||
import { CrisisService } from '../crisis.service';
|
||||
import { Crisis } from '../crisis';
|
||||
import { Observable } from 'rxjs';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
import { CrisisService } from '../crisis.service';
|
||||
import { Crisis } from '../crisis';
|
||||
import { Observable } from 'rxjs';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'app-crisis-list',
|
||||
|
@ -1,11 +1,11 @@
|
||||
// #docregion
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { CrisisService } from '../crisis.service';
|
||||
import { Crisis } from '../crisis';
|
||||
import { Observable } from 'rxjs';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
import { CrisisService } from '../crisis.service';
|
||||
import { Crisis } from '../crisis';
|
||||
import { Observable } from 'rxjs';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'app-crisis-list',
|
||||
|
@ -1,8 +1,8 @@
|
||||
// Snapshot version
|
||||
// #docregion
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { HeroService } from '../hero.service';
|
||||
import { Hero } from '../hero';
|
||||
|
@ -7,7 +7,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { Router, ActivatedRoute, ParamMap } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { HeroService } from '../hero.service';
|
||||
import { HeroService } from '../hero.service';
|
||||
import { Hero } from '../hero';
|
||||
|
||||
@Component({
|
||||
|
@ -7,7 +7,7 @@ import { Router, ActivatedRoute, ParamMap } from '@angular/router';
|
||||
// #enddocregion imports-route-info
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { HeroService } from '../hero.service';
|
||||
import { HeroService } from '../hero.service';
|
||||
import { Hero } from '../hero';
|
||||
|
||||
@Component({
|
||||
|
@ -1,11 +1,11 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
// TODO: Feature Componetized like HeroCenter
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { HeroService } from '../hero.service';
|
||||
import { HeroService } from '../hero.service';
|
||||
import { Hero } from '../hero';
|
||||
|
||||
@Component({
|
||||
|
@ -10,7 +10,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
// #enddocregion import-router
|
||||
|
||||
import { HeroService } from '../hero.service';
|
||||
import { HeroService } from '../hero.service';
|
||||
import { Hero } from '../hero';
|
||||
|
||||
@Component({
|
||||
|
@ -1,9 +1,9 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
|
||||
|
||||
const heroesRoutes: Routes = [
|
||||
{ path: 'heroes', component: HeroListComponent },
|
||||
|
@ -1,9 +1,9 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
|
||||
|
||||
const heroesRoutes: Routes = [
|
||||
{ path: 'heroes', component: HeroListComponent, data: { animation: 'heroes' } },
|
||||
|
@ -1,9 +1,9 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
|
||||
|
||||
const heroesRoutes: Routes = [
|
||||
{ path: 'heroes', redirectTo: '/superheroes' },
|
||||
|
@ -1,12 +1,12 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
// #docregion v1
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
|
||||
import { HeroListComponent } from './hero-list/hero-list.component';
|
||||
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
|
||||
|
||||
// #enddocregion v1
|
||||
import { HeroesRoutingModule } from './heroes-routing.module';
|
||||
|
Reference in New Issue
Block a user