0.5.2 • Published 5 years ago

md-color-menu v0.5.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

md-color-menu (Angular Material Color Picker) Bower version

Simple color picker based on Angular Material. Colors are pre-defined by the Material Design Color Palette. Try out the Demo.

md-color-menu

Install

Download and install with bower:

bower install md-color-menu --save

Add exported CSS and Javascript:

<link rel="stylesheet" href="bower_components/md-color-menu/md-color-menu.css" />
<script src="bower_components/md-color-menu/md-color-menu.js"></script>

Add the module to your Angular dependencies:

angular.module('myApp', ['mdColorMenu'])

Usage

Define a color on your $scope:

angular
  .module('myApp')
  .controller('Controller', function ($scope, mdPickerColors) {
    $scope.color = mdPickerColors.getColor('#D32F2F'); // pick red as default color
  });

Pass color to <md-color-menu> directive and optionally watch for changes:

<md-color-menu color="color">
  <md-button ng-style="color.style">Change my color</md-button>
</md-color-menu>
0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago