5.0.2 • Published 5 months ago

ngx-explorer v5.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

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
  2. Provide IDataService implementation
  3. Add to template
  4. Styles

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

5.0.2

5 months ago

5.0.1

6 months ago

5.0.0

6 months ago

4.5.0

7 months ago

4.4.0

7 months ago

4.3.0

8 months ago

4.2.1

8 months ago

4.2.0

9 months ago

0.0.0-watch

9 months ago

4.1.0

9 months ago

4.0.0

9 months ago

4.1.1

9 months ago

3.0.3

9 months ago

3.0.2

9 months ago

3.1.0

9 months ago

3.0.1

9 months ago

3.0.0

9 months ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

2.0.0

1 year ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.2.2

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.0.0

2 years ago

0.2.2

2 years ago

0.1.0

3 years ago

0.2.1

3 years ago

0.0.3

3 years ago

0.2.0

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago