Giter Site home page Giter Site logo

ionic-select's Introduction

##Introduction:

This is a ionic-selection bower component which can be used with any Ionic framework's application.

TODO: make demo View Demo

##Prerequisites.

  1. node.js, bower and gulp.

##How to use:

  1. In your project repository install the ionic select modal using bower

    bower install ionic-select --save

Give the path of style.css, templates.js and ionic-select.js in your index.html file.

<link href="lib/ionic-select/dist/style.css" rel="stylesheet"> 
<!-- path to ionic/angularjs js -->
<script src="lib/ionic-select/dist/templates.js"></script>
<script src="lib/ionic-select/dist/ionic-select.js"></script>
  1. In your application module inject the dependency ionic-select,
angular.module('mainModuleName', ['ionic', 'ionic-select']){
 //
}
  1. Use the below format in your template's corresponding controller
$scope.collection = ['item1Name', 'item2Name'];
$scope.selected = collection[0];
$scope.title = "items";
  1. Then use the below format in your template / html file
<ion-select iCollection="collection" iSelected="selectedObj" iTitle="title" >
    <button class="button button-block button-positive"> {{ selectedObj }} </button>
</ion-select>

a) ion-select is the directive, to which we can pass required vales.

b) iCollection takes an array. If we don't pass any value, the default value will be [].

c) iSelected takes an object. this object is the currently selected item and will be overwritten with the new selection.

d) iTitle takes a string. This is the name of the collection. eg. 'categories' or 'fish'.

Tested with angular#1.3.6 and ionic#1.0.0.

##Screen Shots: TODO: take screen shots

Once you are successfully done with the above steps, you should be able to see the below screen shots. I have used two buttons here.

The first screen shot shows only the buttons before clicking on them. Once you click on the button you should see the second screen shot.

##Versions:

1) v0.0.0

The whole select functionality has been implemented, and can be installed with bower install ionic-select --save

1) v0.0.3

Bug Fixes.`

##License: MIT

##Contact: gmail : [email protected]

github : https://github.com/steveemmerich

ionic-select's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.