Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rajasharan/angular-us-map

An angular module to show data while hovering over different US states.
https://github.com/rajasharan/angular-us-map

Last synced: 3 days ago
JSON representation

An angular module to show data while hovering over different US states.

Awesome Lists containing this project

README

        

# angular-us-map
An angular module to show data while hovering over different US states.

### [Live demo link](https://rajasharan.github.io/angular-us-map)

## Install
```sh
$ bower install angular-us-map --save
```

## Usage
#### Include `us-map.js` script after angular
```html

```

#### Import module `usMap` as dependency
```js
angular.module('myApp', ['usMap']);
```

#### Add your html inside ``
```html


Virginia



West

Virginia

```
![Virginia](/pics/VA.png) ![West Virginia](/pics/WV.png)

#### Add any scope object inside ``
```html




{{ctrl.data['CA'] | json}}


{{ctrl.data['WA'] | json}}




```
![California](/pics/CA.png) ![Washington](/pics/WA.png)

#### More complex example
```html







{{result.stateName}} ({{result.total}} delegates)




{{result.winnerName}}

{{result.winnerCount}}


{{result.looserName}}

{{result.looserCount}}








```
![Democratic Primaries](/pics/US.png)

## [License](/LICENSE)
The MIT License (MIT)

## Attribution
[us-map.svg](https://commons.wikimedia.org/wiki/File:Blank_US_Map_(states_only).svg) is licensed under [Attribution-Share Alike 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/deed.en)