angular-bootstrap-fileinput

WebJar for angular-bootstrap-fileinput

License

License

MIT
Categories

Categories

Github Development Tools Version Controls Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

github-com-geraldhumphries-angular-bootstrap-fileinput
Last Version

Last Version

v0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

angular-bootstrap-fileinput
WebJar for angular-bootstrap-fileinput
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/geraldhumphries/angular-bootstrap-fileinput

Download github-com-geraldhumphries-angular-bootstrap-fileinput

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/github-com-geraldhumphries-angular-bootstrap-fileinput/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>github-com-geraldhumphries-angular-bootstrap-fileinput</artifactId>
    <version>v0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-geraldhumphries-angular-bootstrap-fileinput/
implementation 'org.webjars.bower:github-com-geraldhumphries-angular-bootstrap-fileinput:v0.1.0'
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-geraldhumphries-angular-bootstrap-fileinput/
implementation ("org.webjars.bower:github-com-geraldhumphries-angular-bootstrap-fileinput:v0.1.0")
'org.webjars.bower:github-com-geraldhumphries-angular-bootstrap-fileinput:jar:v0.1.0'
<dependency org="org.webjars.bower" name="github-com-geraldhumphries-angular-bootstrap-fileinput" rev="v0.1.0">
  <artifact name="github-com-geraldhumphries-angular-bootstrap-fileinput" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='github-com-geraldhumphries-angular-bootstrap-fileinput', version='v0.1.0')
)
libraryDependencies += "org.webjars.bower" % "github-com-geraldhumphries-angular-bootstrap-fileinput" % "v0.1.0"
[org.webjars.bower/github-com-geraldhumphries-angular-bootstrap-fileinput "v0.1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.bower : bootstrap-fileinput jar [4.0.0,5)

Project Modules

There are no modules declared in this project.

angular-bootstrap-fileinput

A simple wrapper for bootstrap-fileinput by @kartik-v.

What this does

This package adds a very simple directive to your AngularJS application that allows you to use and pass options to bootstrap-fileinput the AngularJS way. It can also set a watcher on the options object so any changes will immediately be reflected in the element.

What this does NOT do

Aside from initialization and a watcher on the options object, this does not provide any functionality for interacting with bootstrap-fileinput. You will still need to follow the documentation for bootstrap-fileinput to properly configure it.

Installation

  • Install this package using bower: bower install --save angular-bootstrap-fileinput

  • Install this package manually by including angular-bootstrap-fileinput.js. You also need to have bootstrap-fileinput and its dependencies installed.

Refer to the official documentation for a complete guide on installing bootstrap-fileinput itself.

Usage

Because this is just a wrapper for bootstrap-fileinput, you need to have it and all of its dependencies installed as a prerequisite. If you use bower it will be installed automatically.

1. After installation, add angular-bootstrap-fileinput as a dependency to your application:

angular.module('app', ['angularBootstrapFileinput'])

2. Initialize a file input field with bootstrap-fileinput by using the new angular-bfi directive:

<input id="input-id" type="file" class="file" angular-bfi />

3. You can configure bootstrap-fileinput by passing in an options object to the angular-bootstrap-fileinput directive:

$scope.bfiConfig = {
    showUpload: false,
    previewFileType: 'any'
}
<input id="input-id" type="file" class="file" angular-bfi="bfiConfig" />

If you wish to make the element refresh any time the options are changed, you can set watch-options="true". This will immediately call refresh on the element's bootstrap-fileinput instance, applying the new options. This behaviour is disabled by default.

<input id="input-id" type="file" class="file" angular-bfi="bfiConfig" watch-options="true" />

An options object can be passed directly to the directive:

<input id="input-id" type="file" class="file" angular-bfi="{'showUpload':false, 'previewFileType':'any'}" />

Options can also be passed in using data attributes:

<input id="input-id" type="file" class="file" data-preview-file-type="text" >

The full list of configuration options can be found in the bootstrap-fileinput documentation

Versions

Version
v0.1.0