angularjs - Gradients with Angular Material md-colors directive -
i'm wondering if there way gradients using angular material md-colors directive?
https://material.angularjs.org/1.1.1/api/directive/mdcolors
thanks
it doesn't seem possible md-colors
directive can programatically - codepen
markup
<div ng-controller="appctrl ctrl" ng-cloak="" ng-app="myapp" layout-fill layout-padding layout="column"> <div style="background: linear-gradient({{ctrl.color1}}, {{ctrl.color2}})" flex></div> </div>
js
angular.module('myapp',['ngmaterial']) .controller('appctrl', function($mdcolors) { this.color1 = $mdcolors.getthemecolor('primary-600'); this.color2 = $mdcolors.getthemecolor('primary-100'); });
note won't work ie. docs:
Comments
Post a Comment