Coder Social home page Coder Social logo

china-area-selector's Introduction

China-area-selector

Installation

Install via bower

bower install china-area-selector --save

Usage

Add it as a dependency to your app and then use china-area-selector in your HTML files.

HTML

<china-area-selector region="region1"></china-area-selector>
<china-area-selector region="region2"></china-area-selector>

Javascript

var app = angular.module('demo', ['china-area-selector']);

app.controller('Ctrl' , function($scope) {

  $scope.region1 = {};
  
  $scope.region2 = {
    province: '河北省',
    city: '承德市',
    area: '承德县'
  };
});

备注:

对于一些没有区的市辖区直接区县以市辖区名称代替,比如广东省的东莞市。

而对于北京市等直辖市的市辖区直接以北京市代替。

对于china-area-selector-with-wrapper,适用于wap,或者需要自己定义显示的时候,这个会比较方便。

详见 Demo 页面

License

MIT

china-area-selector's People

Contributors

declan94 avatar yanxi123-com avatar

Watchers

 avatar  avatar

Forkers

reallong

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.