0.0.10 • Published 7 years ago

angular-mn-select v0.0.10

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

npm version Dependency Status MIT Licence

angular-mn-select

An angular directive to mn-select

See the demo

preview demo

Install

npm install --save angular-mn-select

And bundle dependencies and main files in dist/ with your preferred tool.

usage

// add dependency in you module
angular.module('app', [
  'mn-select'
]);

in your controller, you just need a array to be the values, similar to

angular
  .module('app')
  .controller('HousesController', HousesController)

function HousesController() {
  // or $scope.options if you use $scope
  this.options = [
    {text: 'Stark', value: 'stark'},
    {text: 'Lannister', value: 'lannister'},
    {text: 'Targaryen', value: 'targaryen'},
    {text: 'Baratheon', value: 'baratheon'},
  ]
}

finally in html, use the tags mn-select and option, and directives ng-repeat and ng-value, e.g.

<mn-select ng-model='houses' placeholder='Houses'>
  <option ng-repeat="option in options" ng-value="option.value">{{ option.text }}</option>
</mn-select>

For more details check mn-select docs.

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago