Skip to content

nicgirault/angular-colorBrewer-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-colorBrewer-picker

An Angular stand-alone module to select a color Brewer palette.

Demo

Install

bower install --save angular-colorBrewer-selector

Usage

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">

    <script src="angular.min.js"></script>
    <script src="angular-color-brewer-picker.min.js"></script>

    <link rel="stylesheet" href="bootstrap.min.css">
    <link rel="stylesheet" href="angular-color-brewer-picker.min.css">

    <script>
      angular.module('demo', ['colorBrewer'])
      .controller('demoCtrl', function($scope) {
        $scope.onSelect = function(item, isReverse){
          console.log(item, isReverse);
        };
      });
    </script>
  </head>

  <body ng-app="demo">
    <div ng-controller="demoCtrl">
      <div>
        <palette-picker
          initial-name='Blues'
          initial-range='4'
          initial-reverse='false'
          on-select='onSelect(item, isReverse)'
        />
      </div>
    </div>
  </body>
</html>