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
Michael Prentice

parent
b88abd81c8
commit
c980caecac
@ -1,4 +1,4 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
export const routes: Routes = [
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { ContactComponent } from './contact.component';
|
||||
import { ContactComponent } from './contact.component';
|
||||
|
||||
const routes = [
|
||||
{ path: 'contact', component: ContactComponent}
|
||||
|
@ -1,9 +1,9 @@
|
||||
// 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 { Contact, ContactService } from './contact.service';
|
||||
import { UserService } from '../greeting/user.service';
|
||||
import { UserService } from '../greeting/user.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-contact',
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { SharedModule } from '../shared/shared.module';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { SharedModule } from '../shared/shared.module';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
import { ContactComponent } from './contact.component';
|
||||
import { ContactService } from './contact.service';
|
||||
import { ContactComponent } from './contact.component';
|
||||
import { ContactService } from './contact.service';
|
||||
import { ContactRoutingModule } from './contact-routing.module';
|
||||
|
||||
@NgModule({
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Injectable, OnDestroy } from '@angular/core';
|
||||
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { delay } from 'rxjs/operators';
|
||||
import { delay } from 'rxjs/operators';
|
||||
|
||||
export class Contact {
|
||||
constructor(public id: number, public name: string) { }
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { Customer,
|
||||
CustomersService } from './customers.service';
|
||||
CustomersService } from './customers.service';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes,
|
||||
RouterModule } from '@angular/router';
|
||||
|
||||
import { CustomersComponent } from './customers.component';
|
||||
import { CustomersListComponent } from './customers-list.component';
|
||||
import { CustomersComponent } from './customers.component';
|
||||
import { CustomersListComponent } from './customers-list.component';
|
||||
import { CustomersDetailComponent } from './customers-detail.component';
|
||||
|
||||
const routes: Routes = [
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
import { CustomersService } from './customers.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 { CustomersListComponent } from './customers-list.component';
|
||||
import { CustomersRoutingModule } from './customers-routing.module';
|
||||
import { CustomersService } from './customers.service';
|
||||
import { CustomersListComponent } from './customers-list.component';
|
||||
import { CustomersRoutingModule } from './customers-routing.module';
|
||||
import { CustomersService } from './customers.service';
|
||||
|
||||
|
||||
@NgModule({
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Injectable, OnDestroy } from '@angular/core';
|
||||
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { delay } from 'rxjs/operators';
|
||||
import { delay } from 'rxjs/operators';
|
||||
|
||||
export class Customer {
|
||||
constructor(public id: number, public name: string) { }
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { UserService } from '../greeting/user.service';
|
||||
import { UserService } from '../greeting/user.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-greeting',
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { Item,
|
||||
ItemService } from './items.service';
|
||||
ItemService } from './items.service';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Observable }from 'rxjs';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { Item,
|
||||
ItemService } from './items.service';
|
||||
import { Item, ItemService } from './items.service';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes,
|
||||
RouterModule } from '@angular/router';
|
||||
RouterModule } from '@angular/router';
|
||||
|
||||
import { ItemsListComponent } from './items-list.component';
|
||||
import { ItemsDetailComponent } from './items-detail.component';
|
||||
import { ItemsListComponent } from './items-list.component';
|
||||
import { ItemsDetailComponent } from './items-detail.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: 'list', pathMatch: 'full'},
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { ItemsComponent } from './items.component';
|
||||
import { ItemsListComponent } from './items-list.component';
|
||||
import { ItemsDetailComponent } from './items-detail.component';
|
||||
import { ItemService } from './items.service';
|
||||
import { ItemsRoutingModule } from './items-routing.module';
|
||||
import { ItemsListComponent } from './items-list.component';
|
||||
import { ItemsDetailComponent } from './items-detail.component';
|
||||
import { ItemService } from './items.service';
|
||||
import { ItemsRoutingModule } from './items-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [ CommonModule, ItemsRoutingModule ],
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Injectable, OnDestroy } from '@angular/core';
|
||||
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { delay } from 'rxjs/operators';
|
||||
import { delay } from 'rxjs/operators';
|
||||
|
||||
export class Item {
|
||||
constructor(public id: number, public name: string) { }
|
||||
|
@ -1,9 +1,9 @@
|
||||
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 { AwesomePipe } from './awesome.pipe';
|
||||
import { HighlightDirective } from './highlight.directive';
|
||||
import { AwesomePipe } from './awesome.pipe';
|
||||
import { HighlightDirective } from './highlight.directive';
|
||||
|
||||
@NgModule({
|
||||
imports: [ CommonModule ],
|
||||
|
Reference in New Issue
Block a user