Fileinput component for Angular2.
A native fileinput component for angular 2.
See the [ng2-bl-fileinput] page for examples.
- Getting started
- Input properties
- Output events
For npm users:
```
npm install --save ng2-bl-fileinput
For yarn users:
``
yarn add ng2-bl-fileinput
#### Angular cli
After installation, no additional configuration is needed. Import the
BlFileinputModule and define it as one of the imports of your application module:
`typescript
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {BlFileinputModule} from 'ng2-bl-fileinput';
import {AppComponent} from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
BlFileinputModule
],
bootstrap: [
AppComponent
]
})
export class AppModule {}
`
| Name | Type | Default | Description |
| ------------------ | ----------------------------- | --------------------- | -------------------------------------------------------------------------------------------------- |
| accept | Array|string | null | List of allowed file types (MIME-Type or file extension) as array or comma separated as a string. |boolean
| buttonOnly | | false | If set to true, only the fil selection button is shown. |string
| buttonText | | choose file(s) | Only applies to single select. If set to true, a clickable clear selection cross is shown. |string
| icon | | "" | CSS Class(es) for a Icon that is shown on the button. |boolean
| multiple | | false | If set to true, the fileinput component is multi-select, otherwise single select. |string
| placeholder | | "" | Placeholder text that is shown if no options are selected. |
| Name | Value | Description |
| ------------- | -------------------------- | ------------------------------------------------------------------------ |
| fileChanged | File|Array
[ng2-bl-fileinput]: https://saithis.gitlab.io/ng2-bl-fileinput/