You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ngx-explorer

Package Overview
Dependencies
Maintainers
0
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-explorer

Angular file explorer component with tree view

5.0.2
latest
Source
npmnpm
Version published
Weekly downloads
144
41.18%
Maintainers
0
Weekly downloads
 
Created
Source

ngx-explorer

Lightweight and easy-to-use Angular File Explorer module. This is a front-end implementation only. There are no services at this point.

explorer

See live Demo

Prerequisites

  • Angular 17+

How to use

1. Install package

npm i ngx-explorer

2. Data Service

Implement IDataService provider interface which contains API for fetching data from the server.

import { IDataService } from 'ngx-explorer';

export class MyDataService implements IDataService<MyDataType> {
    ...
}

And provide the implementation:

 { provide: DataService, useClass: ExampleDataService },

3. Add to template

Import components from ngx-explorer and provide in imports array in either module, main.ts or component.

    imports: [ExplorerComponent],

and add tags to the template:

<nxe-explorer></nxe-explorer>

See list of available components here

4. Styles

  • Add css import styles.scss:
@import 'ngx-explorer/src/assets/icons/css/nxe.css';

APIs

All the communication with the server is done through the ExplorerService APIs. It provides methods for fetching data, creating, renaming, deleting files and directories.

import { ExplorerService } from 'ngx-explorer';
...
constructor(private explorerService: ExplorerService) {

    // start explorer by loading root level data
    explorerService.openNode();

    // subscribe to tree updates
    explorerService.root$.subscribe((root) => {
        console.log('Root:', root);
    });
}

Customization

See Customization for more details.

Author

@artemnih

artemnih

Keywords

angular

FAQs

Package last updated on 01 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts