Skip to content

Commit

Permalink
refactor(module): remove all Service exports since they aren't singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghislain Beaulac authored and Ghislain Beaulac committed May 23, 2018
1 parent 08882be commit 2cf1537
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 45 deletions.
3 changes: 2 additions & 1 deletion src/app/examples/swt-common-grid-test.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild, ModuleWithProviders, NgModule, ViewContainerRef, ComponentFactoryResolver, OnChanges, AfterContentInit, AfterViewChecked, ElementRef, Renderer, EventEmitter,
Output, AfterViewInit} from '@angular/core';
Output, AfterViewInit, Injectable} from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Routes, RouterModule } from '@angular/router';

Expand All @@ -17,6 +17,7 @@ import { Logger } from './swt-logger.service';
selector: 'swt-common-grid-test',
templateUrl: './swt-common-grid-test.component.html'
})
@Injectable()
export class SwtCommonGridTestComponent implements OnInit, AfterViewInit {
componentFactory: any;
testurl = 'http://127.0.0.1:8080/grid!display.do?';
Expand Down
6 changes: 2 additions & 4 deletions src/app/examples/swt-common-grid.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { Component, OnInit, Injectable, ViewContainerRef, ComponentFactoryResolv
ElementRef, Renderer} from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { AngularSlickgridComponent, Column, Editors, FieldType, Formatter, Formatters,
GridService, GridExtraUtils, GridOption, OnEventArgs, ResizerService,
FilterService, SortService, BackendService,
GridOption, OnEventArgs, BackendService,
BackendServiceOption, FilterChangedArgs, PaginationChangedArgs, SortChangedArgs, Pagination} from '../modules/angular-slickgrid';
import { TranslateService } from '@ngx-translate/core';
import { Logger } from './swt-logger.service';
Expand Down Expand Up @@ -150,8 +149,7 @@ export class SwtCommonGridComponent implements OnInit, AfterViewInit, BackendSer
* @param resizer
* @param httpClient
*/
constructor( private gridService: GridService, private resizer: ResizerService, private httpClient: HttpClient,
private filterService: FilterService, private sortService: SortService, private translate: TranslateService,
constructor(private httpClient: HttpClient, private translate: TranslateService,
private el: ElementRef, private renderer: Renderer) {
this.logger = new Logger('grid', httpClient);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
import { SharedService } from './../services/shared.service';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
import { AngularSlickgridComponent } from './../components/angular-slickgrid.component';
import { CollectionService } from './../services/collection.service';
import { ControlAndPluginService } from '../services/controlAndPlugin.service';
import { ExportService } from '../services/export.service';
import { FilterService } from './../services/filter.service';
import { GraphqlService } from './../services/graphql.service';
import { GridOdataService } from './../services/grid-odata.service';
import { GridOption } from './../models/gridOption.interface';
import { GridEventService } from './../services/gridEvent.service';
import { GridService } from './../services/grid.service';
import { GridStateService } from './../services/gridState.service';
import { GroupingAndColspanService } from './../services/groupingAndColspan.service';
import { OdataService } from './../services/odata.service';
import { ResizerService } from './../services/resizer.service';
import { SlickPaginationComponent } from './../components/slick-pagination.component';
import { SortService } from './../services/sort.service';


@NgModule({
imports: [
Expand All @@ -41,19 +31,8 @@ export class AngularSlickgridModule {
providers: [
{ provide: 'config', useValue: config },
CollectionService,
ControlAndPluginService,
ExportService,
FilterService,
GraphqlService,
GridEventService,
GridService,
GridOdataService,
GridStateService,
GroupingAndColspanService,
OdataService,
ResizerService,
SharedService,
SortService
GridOdataService
]
};
}
Expand Down
1 change: 0 additions & 1 deletion src/app/modules/angular-slickgrid/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ export * from './gridState.service';
export * from './groupingAndColspan.service';
export * from './odata.service';
export * from './resizer.service';
export * from './shared.service';
export * from './sort.service';
export * from './utilities';
16 changes: 0 additions & 16 deletions src/app/modules/angular-slickgrid/services/shared.service.ts

This file was deleted.

0 comments on commit 2cf1537

Please sign in to comment.