diff --git a/README.md b/README.md index 515331f..dffd6a6 100644 --- a/README.md +++ b/README.md @@ -404,7 +404,19 @@ Example(the same as in the example file): ] ``` +## Positioning the angularStrap select. +The placement option can be used to position a [strapselect](http://mgcrea.github.io/angular-strap/#/selects). Possible values for placement are top, bottom, left, right, auto or any combination (e.g. bottom-right). +Further details can be found in the [angularStrap select documentation](http://mgcrea.github.io/angular-strap/#/selects-usage). +Example (the same as in the example file): +```js + "key": "select_placement", + "placeholder": "Please select from the right.", + "options": { + "placement": "right" + } + +``` ### And then a submit button. Not needed, of course, but is commonly used. ```js diff --git a/app.js b/app.js index 145d63f..d0df0b8 100644 --- a/app.js +++ b/app.js @@ -158,6 +158,12 @@ testApp.controller("appController", ["$scope", "$http", function ($scope, $http) items: {type: "string"}, description: "If you select more than two items here, it will only show the first two and " }, + select_placement: { + title: "Strap select with position set to right", + type: "string", + enum: ["value1", "value2", "value3"], + description: "Position of the select set using the placement option." + }, "priorities": { "type": "object", "properties": { @@ -329,6 +335,13 @@ testApp.controller("appController", ["$scope", "$http", function ($scope, $http) {"value": "value4", "name": "text4"} ] }, + { + "key": "select_placement", + "placeholder": "Please select from the right.", + "options": { + "placement": "right" + } + }, { "key": "priorities.priority", "title": "Array inside an object, defaults ASF select only", diff --git a/src/strapmultiselect.html b/src/strapmultiselect.html index 95cdf29..b1ddf5c 100644 --- a/src/strapmultiselect.html +++ b/src/strapmultiselect.html @@ -6,7 +6,9 @@