Guest User

Untitled

a guest
Dec 27th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. import { Component, OnInit } from '@angular/core';
  2. import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';
  3. import { Router } from '@angular/router';
  4.  
  5. import { OrganisationsApiService } from 'src/app/api/organisations/organisations-api.service';
  6. import { HttpClient, HttpClientModule, HttpHandler } from '@angular/common/http';
  7.  
  8.  
  9. @Component({
  10. selector: 'app-modal-wipedall',
  11. templateUrl: './modal-wiped-all.component.html',
  12. providers: [NgbActiveModal,
  13. OrganisationsApiService,
  14. HttpClientModule,
  15. HttpClient,
  16. ]})
  17.  
  18. import { Component, OnInit } from '@angular/core';
  19. import { HttpClient, HttpClientModule, HttpHandler } from '@angular/common/http';
  20. import { OrganisationsApiService } from 'src/app/api/organisations/organisations-api.service';
  21. import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
  22.  
  23. import { ModalWipedAllComponent } from '../modal/modal-wiped-all/modal-wiped-all.component';
  24.  
  25.  
  26.  
  27. @Component({
  28. selector: 'app-cleanup',
  29. templateUrl: './cleanup.component.html',
  30. styleUrls: ['./cleanup.component.css'],
  31. providers: [OrganisationsApiService,
  32. NgbModal,
  33. HttpClientModule,
  34. HttpClient,
  35.  
  36. ]
  37. })
  38.  
  39.  
  40. export class CleanupComponent implements OnInit {
  41.  
  42. submitted: boolean;
  43. loading: boolean;
  44. deleted: number;
  45.  
  46. constructor(
  47. private http: HttpClient,
  48. private api: OrganisationsApiService,
  49. private modalService: NgbModal) {
  50.  
  51. }
  52.  
  53. providers: [AwsApiService,
  54. OrganisationsApiService,
  55. LabsApiService,
  56. UsersApiService,
  57. UserManagementDataService,
  58. ConfigDataService,
  59. ErrorDataService,
  60. DeploymentResponseDataService,
  61. ModalOptionsComponent,
  62. ModalConfigurationComponent,
  63. ModalUndeployLabComponent,
  64. ModalCreatedUserComponent,
  65. NgbActiveModal,
  66. HttpClientModule,
  67. HttpClient,
  68.  
  69.  
  70. { provide: HTTP_INTERCEPTORS,
  71. useClass: HttpRequestInterceptor,
  72. multi: true}
  73. ],
  74.  
  75. CleanupComponent.CleanupComponent should createChrome 56.0.2924 (Linux 0.0.0)
  76. <1s
  77. Error: StaticInjectorError(DynamicTestModule)[HttpClient -> HttpHandler]:
  78. StaticInjectorError(Platform: core)[HttpClient -> HttpHandler]:
  79. NullInjectorError: No provider for HttpHandler!
  80. at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get node_modules/@angular/core/fesm5/core.js:1062:1)
  81. at resolveToken node_modules/@angular/core/fesm5/core.js:1300:1)
  82. at tryResolveToken node_modules/@angular/core/fesm5/core.js:1244:1)
  83. at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get node_modules/@angular/core/fesm5/core.js:1141:1)
  84. at resolveToken node_modules/@angular/core/fesm5/core.js:1300:1)
  85. at tryResolveToken node_modules/@angular/core/fesm5/core.js:1244:1)
  86. at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get node_modules/@angular/core/fesm5/core.js:1141:1)
  87. at resolveNgModuleDep node_modules/@angular/core/fesm5/core.js:8369:1)
  88. at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get node_modules/@angular/core/fesm5/core.js:9057:1)
  89. at resolveDep node_modules/@angular/core/fesm5/core.js:9422:1)
  90.  
  91.  
  92.  
  93.  
  94. ModalWipedAllComponent.ModalWipedAllComponent should createChrome 56.0.2924 (Linux 0.0.0)
  95. <1s
  96. Error: StaticInjectorError(DynamicTestModule)[HttpClient -> HttpHandler]:
  97. StaticInjectorError(Platform: core)[HttpClient -> HttpHandler]:
  98. NullInjectorError: No provider for HttpHandler!
  99. at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get node_modules/@angular/core/fesm5/core.js:1062:1)
  100. at resolveToken node_modules/@angular/core/fesm5/core.js:1300:1)
  101. at tryResolveToken node_modules/@angular/core/fesm5/core.js:1244:1)
  102. at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get node_modules/@angular/core/fesm5/core.js:1141:1)
  103. at resolveToken node_modules/@angular/core/fesm5/core.js:1300:1)
  104. at tryResolveToken node_modules/@angular/core/fesm5/core.js:1244:1)
  105. at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get node_modules/@angular/core/fesm5/core.js:1141:1)
  106. at resolveNgModuleDep node_modules/@angular/core/fesm5/core.js:8369:1)
  107. at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get node_modules/@angular/core/fesm5/core.js:9057:1)
  108. at resolveDep node_modules/@angular/core/fesm5/core.js:9422:1)
  109.  
  110. @NgModule({
  111. ...
  112. imports : [HttpClientModule],
  113. providers: [.... other services ..]
  114. })
  115.  
  116. @NgModule({
  117. ...
  118. imports : [HttpClientModule,NgbModule.forRoot()],
  119. providers: [.... other services ..]
  120. })
Add Comment
Please, Sign In to add comment