mdds-angular-file
TypeScript icon, indicating that this package has built-in type declarations

0.7.110 • Public • Published

Augular Authentication and Authorization Module

Usage:

  1. Add 'mdds-angular-file" package as dependency in your project in file package.json:

For example:

"dependencies": { "@angular/common": "^6.0.3", "@angular/core": "^6.0.3", "@angular/forms": "^6.0.3", "@angular/http": "^6.0.3", "@angular/router": "^6.0.3", "rxjs": "^6.0.0", "zone.js": "^0.8.26", ... ... "mdds-angular-file": "" },

  1. Create a file-upload.config.ts to add the following two configuration variables required by 'mdds-angular-file' logic:

export const file_upload_uri: string = '/api/files/upload'; export const file_download_uri: string = '/api/files/download';

  1. Declare two providers in your app.module.ts:

import { FILE_UPLOAD_URI, FILE_DOWNLOAD_URI } from 'mdds-angular-file'; import { file_upload_uri, file_download_uri } from './file-upload.config'; ... @NgModule( ... providers: [ ... { provide: FILE_UPLOAD_URI, useValue: file_upload_uri }, { provide: FILE_DOWNLOAD_URI, useValue: file_download_uri }

] ...

  1. Import 'FileUploadModule' in app.module.ts:

import { FileUploadModule } from 'mdds-angular-file'; ...

@NgModule( ... imports: [ ... FileUploadModule ], ...

  1. Use the file upload cmoponent in your HTML:

app.component.html

...

Readme

Keywords

Package Sidebar

Install

npm i mdds-angular-file

Weekly Downloads

18

Version

0.7.110

License

MIT

Unpacked Size

183 kB

Total Files

32

Last publish

Collaborators

  • toliujiayi