ng-selectpicker

WebJar for ng-selectpicker

License

License

MIT
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

github-com-tdascoli-ng-selectpicker
Last Version

Last Version

1.2.7.2
Release Date

Release Date

Type

Type

jar
Description

Description

ng-selectpicker
WebJar for ng-selectpicker
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/tdascoli/ng-selectpicker

Download github-com-tdascoli-ng-selectpicker

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.bower : angular jar [0,)
org.webjars.bower : bootstrap-select jar 1.5.4

Project Modules

There are no modules declared in this project.

nya-bootstrap-select

Build Status

An AngularJS directive wrapper for silviomoreto's Bootstrap-select, which supports ngRepeat in options to dynamically build a Bootstrap-select.

Requirements: AngularJS 1.0+, jQuery 1.7+, Bootstrap-select 1.3+

Usage

  1. install via bower
$ bower install nya-bootstrap-select
  1. include the nyaBootstrapSelect module as a dependency for your app.
angular.module('myApp', ['nya.bootstrap.select'])
  1. include the bootstrap-select js and css file in your html.

  2. Create your <select> with the .nya-selectpicker class or 'nya-selectpicker' attribute. You can use ngRepeat or ngOptions directive to generate <option>. 'ngRepeat' directive is only preferred to use in simple situations. ngOptions is a good choice for generating both <option> and <optgroup>. if you use ng-repeat to generate your option tags. add an ng-model directive to bind a model to your <select>. In order to update the model according to your select, your should bind value with your models.

<select class="nya-selectpicker" ng-model="myModel">
  <option ng-repeat="option in options" value="{{option}}">{{option}}</option>
</select>

ngOptions example:

<select class="nya-selectpicker" ng-model="myModel" ng-options="c.name for c in options">
</select>

Note that you shouldn't use both two method at same time.

  1. init your options model. you can retrieve your model from server any time. when options model changes. ng-repeat will update the <option> s. nya-bootstrap-select directive will update your select as well.
$scope.options = ['alpha', 'bravo', 'charlie'];
  1. Fire up your angular app.

License

Licensed under the MIT license

Versions

Version
1.2.7.2