Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
feat: rename service
Browse files Browse the repository at this point in the history
  • Loading branch information
artemnih committed Oct 1, 2021
1 parent 70c51fb commit 5dd5cfb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { NgxExplorerService } from '../../services/ngx-explorer.service';
import {ExplorerService } from '../../services/explorer.service';

@Component({
selector: 'nxe-explorer',
Expand All @@ -8,7 +8,7 @@ import { NgxExplorerService } from '../../services/ngx-explorer.service';
})
export class ExplorerComponent implements OnInit {

constructor(private explorerService: NgxExplorerService) { }
constructor(private explorerService: ExplorerService) { }

ngOnInit(): void { }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { IconsComponent } from './icons.component';

describe('IconsComponent', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs';
import { NxeNode } from '../../interfaces/nxe-node.interface';
import { NgxExplorerService } from '../../services/ngx-explorer.service';
import { ExplorerService } from '../../services/explorer.service';

@Component({
selector: 'nxe-icons',
Expand All @@ -13,7 +13,7 @@ export class IconsComponent implements OnDestroy {
public items: NxeNode[] = [];
private subs = new Subscription();

constructor(private explorerService: NgxExplorerService) {
constructor(private explorerService: ExplorerService) {
this.subs.add(this.explorerService.openedNode.subscribe(nodes => {
this.items = nodes.children;
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ExampleDataService } from './example-data.service';
@Injectable({
providedIn: 'root'
})
export class NgxExplorerService {
export class ExplorerService {
public readonly selectedNodes = new BehaviorSubject<NxeNode[]>([]);
public readonly openedNode = new BehaviorSubject<NxeNode>(undefined);

Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-explorer/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Public API Surface of ngx-explorer
*/

export * from './lib/services/ngx-explorer.service';
export * from './lib/services/explorer.service';
export * from './lib/ngx-explorer.module';
export * from './lib/components/icons/icons.component';
export * from './lib/components/explorer/explorer.component';

0 comments on commit 5dd5cfb

Please sign in to comment.