From d34fdb58cabacc507939b6ee5df27532befb99cc Mon Sep 17 00:00:00 2001 From: piratefinn Date: Wed, 15 Nov 2017 14:12:28 +0000 Subject: [PATCH] removed unused imports and packages --- package-lock.json | 8 -------- package.json | 2 -- src/app/app.module.ts | 4 ++-- src/app/auth/login.component.ts | 2 -- src/app/auth/register.component.ts | 2 -- src/app/dashboard/account-edit.component.ts | 2 -- src/app/dashboard/add-data.component.ts | 2 -- src/app/dashboard/dashboard-customer.component.ts | 2 -- src/app/dashboard/feedback.component.ts | 2 -- src/app/dashboard/leaderboard.component.ts | 2 -- src/app/dashboard/map.component.ts | 2 -- src/app/dashboard/payroll-log.component.ts | 2 -- src/app/dashboard/trail-map-2.component.ts | 2 -- src/app/dashboard/trail-map.component.ts | 2 -- src/app/dashboard/transaction-log.component.ts | 2 -- src/app/providers/api-service.ts | 4 ++-- 16 files changed, 4 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1fc7f57..a0944ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -268,14 +268,6 @@ "tslib": "1.8.0" } }, - "@angular/http": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.0.1.tgz", - "integrity": "sha1-NQy99jz6yJOWE9dT/wce1YpgVhs=", - "requires": { - "tslib": "1.8.0" - } - }, "@angular/platform-browser": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.0.1.tgz", diff --git a/package.json b/package.json index 847c336..3edc1db 100644 --- a/package.json +++ b/package.json @@ -25,13 +25,11 @@ "@angular/compiler": "5.0.1", "@angular/core": "5.0.1", "@angular/forms": "5.0.1", - "@angular/http": "5.0.1", "@angular/platform-browser": "5.0.1", "@angular/platform-browser-dynamic": "5.0.1", "@angular/router": "5.0.1", "@angular/upgrade": "5.0.1", "@types/moment": "2.13.0", - "angular-in-memory-web-api": "0.5.1", "chart.js": "2.7.1", "core-js": "2.5.1", "js-marker-clusterer": "1.0.0", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6b81ab1..07d74ad 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,7 +1,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { LocationStrategy, HashLocationStrategy } from '@angular/common'; -import { HttpModule } from '@angular/http'; +import { HttpClientModule } from '@angular/common/http'; import { AppComponent } from './app.component'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; @@ -38,7 +38,7 @@ import { DashboardModule } from './dashboard/dashboard.module'; @NgModule({ imports: [ BrowserModule, - HttpModule, + HttpClientModule, NgxPaginationModule, BsDropdownModule.forRoot(), TabsModule.forRoot(), diff --git a/src/app/auth/login.component.ts b/src/app/auth/login.component.ts index 77b2751..96e881b 100644 --- a/src/app/auth/login.component.ts +++ b/src/app/auth/login.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core'; import { Validators, FormBuilder, FormGroup } from '@angular/forms'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; import { Router, ActivatedRoute } from '@angular/router'; import 'rxjs/add/operator/map'; @@ -15,7 +14,6 @@ export class LoginComponent implements OnInit { constructor( private route: ActivatedRoute, - private http: Http, private formBuilder: FormBuilder, private router: Router, private api: ApiService diff --git a/src/app/auth/register.component.ts b/src/app/auth/register.component.ts index d716340..419eeef 100644 --- a/src/app/auth/register.component.ts +++ b/src/app/auth/register.component.ts @@ -1,7 +1,6 @@ import { Component } from '@angular/core'; import { Validators, FormBuilder, FormGroup } from '@angular/forms'; import { ValidationManager } from 'ng2-validation-manager'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; import {Router } from '@angular/router'; import 'rxjs/add/operator/map'; @@ -19,7 +18,6 @@ export class RegisterComponent { registerStatusError = 'Error received, please try again.'; constructor( - private http: Http, private formBuilder: FormBuilder, private router: Router, private api: ApiService, diff --git a/src/app/dashboard/account-edit.component.ts b/src/app/dashboard/account-edit.component.ts index cf5b14c..7590154 100644 --- a/src/app/dashboard/account-edit.component.ts +++ b/src/app/dashboard/account-edit.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { Validators, FormBuilder, FormGroup } from '@angular/forms'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; import 'rxjs/add/operator/map'; @@ -17,7 +16,6 @@ export class AccountEditComponent implements OnInit { submitStatusError = 'Error received, please try again.'; constructor( - private http: Http, private formBuilder: FormBuilder, private api: ApiService, ) { diff --git a/src/app/dashboard/add-data.component.ts b/src/app/dashboard/add-data.component.ts index c894a84..ffa4ef8 100644 --- a/src/app/dashboard/add-data.component.ts +++ b/src/app/dashboard/add-data.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core'; import { Validators, FormBuilder, FormGroup } from '@angular/forms'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; import { OrgTableComponent } from '../shared/org-table.component'; import * as moment from 'moment'; @@ -40,7 +39,6 @@ export class AddDataComponent implements OnInit { minDate: any; constructor( - private http: Http, private formBuilder: FormBuilder, private api: ApiService, ) { diff --git a/src/app/dashboard/dashboard-customer.component.ts b/src/app/dashboard/dashboard-customer.component.ts index 09787e3..39230e3 100644 --- a/src/app/dashboard/dashboard-customer.component.ts +++ b/src/app/dashboard/dashboard-customer.component.ts @@ -1,5 +1,4 @@ import { Directive, Component, OnInit } from '@angular/core'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; import { Router } from '@angular/router'; import { GraphWidget } from '../widgets/graph-widget.component'; @@ -36,7 +35,6 @@ export class DashboardCustomerComponent implements OnInit { }; constructor( - private http: Http, private api: ApiService, ) { this.api.basicStats().subscribe( diff --git a/src/app/dashboard/feedback.component.ts b/src/app/dashboard/feedback.component.ts index 91ef375..5228a3c 100644 --- a/src/app/dashboard/feedback.component.ts +++ b/src/app/dashboard/feedback.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core'; import { Validators, FormBuilder, FormGroup } from '@angular/forms'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; import 'rxjs/add/operator/map'; @@ -16,7 +15,6 @@ export class FeedbackComponent implements OnInit { feedbackFormStatusError = 'Error received, please try again.'; constructor( - private http: Http, private formBuilder: FormBuilder, private api: ApiService, ) { diff --git a/src/app/dashboard/leaderboard.component.ts b/src/app/dashboard/leaderboard.component.ts index ebc669c..4c76fc7 100644 --- a/src/app/dashboard/leaderboard.component.ts +++ b/src/app/dashboard/leaderboard.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; // import { PaginatePipe } from 'ngx-pagination'; import {PaginationInstance} from 'ngx-pagination'; @@ -29,7 +28,6 @@ export class LeaderboardComponent implements OnInit { }; constructor( - private http: Http, private api: ApiService, ) { } diff --git a/src/app/dashboard/map.component.ts b/src/app/dashboard/map.component.ts index 71faed0..41ba36e 100644 --- a/src/app/dashboard/map.component.ts +++ b/src/app/dashboard/map.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; import { AgmCoreModule } from '@agm/core'; import 'rxjs/add/operator/map'; @@ -20,7 +19,6 @@ export class MapComponent implements OnInit { map: any; constructor( - private http: Http, private api: ApiService, ) { } diff --git a/src/app/dashboard/payroll-log.component.ts b/src/app/dashboard/payroll-log.component.ts index 3e7a3ce..3b92ae7 100644 --- a/src/app/dashboard/payroll-log.component.ts +++ b/src/app/dashboard/payroll-log.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; // import { PaginatePipe } from 'ngx-pagination'; import {PaginationInstance} from 'ngx-pagination'; @@ -27,7 +26,6 @@ export class PayrollLogComponent implements OnInit { }; constructor( - private http: Http, private api: ApiService, ) { this.myDate = moment().format('YYYY-MM-DD[T]HH:mm'); diff --git a/src/app/dashboard/trail-map-2.component.ts b/src/app/dashboard/trail-map-2.component.ts index 7d26fda..185d656 100644 --- a/src/app/dashboard/trail-map-2.component.ts +++ b/src/app/dashboard/trail-map-2.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; import { AgmCoreModule } from '@agm/core'; import 'rxjs/add/operator/map'; @@ -20,7 +19,6 @@ export class TrailMapComponent2 implements OnInit { map: any; constructor( - private http: Http, private api: ApiService, ) { } diff --git a/src/app/dashboard/trail-map.component.ts b/src/app/dashboard/trail-map.component.ts index eaa409a..7aed178 100644 --- a/src/app/dashboard/trail-map.component.ts +++ b/src/app/dashboard/trail-map.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; import { AgmCoreModule } from '@agm/core'; import 'rxjs/add/operator/map'; @@ -20,7 +19,6 @@ export class TrailMapComponent implements OnInit { map: any; constructor( - private http: Http, private api: ApiService, ) { } diff --git a/src/app/dashboard/transaction-log.component.ts b/src/app/dashboard/transaction-log.component.ts index 60c4e6f..34408cd 100644 --- a/src/app/dashboard/transaction-log.component.ts +++ b/src/app/dashboard/transaction-log.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { Http, Response } from '@angular/http'; import { ApiService } from '../providers/api-service'; // import { PaginatePipe } from 'ngx-pagination'; import {PaginationInstance} from 'ngx-pagination'; @@ -28,7 +27,6 @@ export class TransactionLogComponent implements OnInit { }; constructor( - private http: Http, private api: ApiService, ) { this.myDate = moment().format('YYYY-MM-DD[T]HH:mm'); diff --git a/src/app/providers/api-service.ts b/src/app/providers/api-service.ts index bb7f2ad..3e4112c 100644 --- a/src/app/providers/api-service.ts +++ b/src/app/providers/api-service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Http } from '@angular/http'; + import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs/Rx'; import { environment } from '../../environments/environment'; import 'rxjs/add/operator/map'; @@ -11,7 +11,7 @@ export class ApiService { private apiUrl = environment.apiUrl; private sessionKey: string = null; constructor( - private http: Http, + private http: HttpClient, ) { if (localStorage.getItem('sessionKey') ) { this.sessionKey = localStorage.getItem('sessionKey');