[英]angularjs-color-picker no color in picker
I am trying to use angularjs-color-picker however the color picker doesnt show up with any color. 我正在尝试使用angularjs-color-picker,但是颜色选择器不会显示任何颜色。
I have added "angularjs-color-picker": "3.4.8"
to package.json 我已经在package.json中添加了
"angularjs-color-picker": "3.4.8"
I added angularjs-color-picker.min.css, angularjs-color-picker-bootstrap.min.css, tinycolor-min.js, & angularjs-color-picker.min.js to gulpfile.js
我在gulpfile.js中添加了angularjs-color-picker.min.css,angularjs-color-picker-bootstrap.min.css,tinycolor-min.js和angularjs-color-
gulpfile.js
I included the module with angular.module('app', ['color.picker']);
我将模块包含在
angular.module('app', ['color.picker']);
And this is what is looks like in the html: <color-picker ng-model="myColor"></color-picker>
这就是html中的样子:
<color-picker ng-model="myColor"></color-picker>
Really stuck on why no colour is showing up. 真正困扰于为什么没有颜色出现。 If I missed a directive I apologize, any input is appreciated.
如果我错过了我道歉的指令,我们将不胜感激。
Angular: 1.6 & Bootstrap: 3 角度:1.6和Bootstrap:3
You need to include tinycolor.js 您需要包含tinycolor.js
Here is the codepen link, where colors are availble in picker. 这是Codepen链接,选择器中的颜色可用。
https://codepen.io/swatifursule/pen/WJrmbB https://codepen.io/swatifursule/pen/WJrmbB
html file : html文件 :
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.10/angular.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinycolor/1.4.1/tinycolor.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angularjs-color-picker/3.4.8/angularjs-color-picker.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/angularjs-color-picker/3.4.8/angularjs-color-picker.css">
<html ng-app="app">
<head></head>
<body>
<color-picker ng-model="myColor"></color-picker>
</body>
</html>
Js file: js文件:
angular.module('app', ['color.picker']);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.