GithubHelp home page GithubHelp logo

mdcountryselect's Introduction

mdCountrySelect (AngularJS + Angular Material Design)

This is an Element or Attribute Directive for Country Selection based on md-select in Angular Material for AngularJS.

Install

Install using npm

npm install md-country-select

Include <script> in index.html:

<script type="text/javascript" src="node_modules/md-country-select/md-country-select.js"></script>

Usage

Inject mdCountrySelect as an dependency in the angular app

angular.module('app',['ngMaterial','mdCountrySelect'])

Use as :

<md-country-select></md-country-select>

Note: Inspired by ng-country-select

Follow me on: facebook twitter linkedIn

mdcountryselect's People

Contributors

ayush-bhandari avatar besongsamuel avatar

Watchers

James Cloos avatar Pedro Francisco avatar  avatar

mdcountryselect's Issues

Make selection mandatory

This directive isn't able to require the choice of a country, much like other Angular-Material directives do, such as:

<md-input-container flex="50">
            <label>Name</label>
            <input required="" name="studentName" ng-model="project.name">
            <div ng-messages="registerStudentForm.studentName.$error">
              <div ng-message="required">This is required.</div>
            </div>
          </md-input-container>

Something similar (and optional, by using an attribute) for this directive would be great, as allows the developer to make the choice required or not.

ng-model not binding and provide empty result.

I am using angular material and md-country-select for countries dropdown but it is not binding with ng-model.

<md-country-select ng-model="user.country"></md-country-select>

Is this a bug or I am doing something wrong ?

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.