0
我正在尝试使用ngPicky colour picker。我不知道如何定义指令或避免我在使用php脚本时遇到的错误。ngPicky颜色选择器问题
Parse error: syntax error, unexpected 'color' (T_STRING), expecting ',' or ';' in .../themes/Silk_af_v155/index.template.php on line 834
825: }
826:
827: function template_colour_picker()
828:
829: {
830: echo'
831: <div ng-app="myApp" ng-controller="ngPicky" ng-model="color">
832: <input type="picker" ng-model="color">
833: <div class="category_header forum_category" style="background:{{color | toHex}};"></div>
834: <picker color='color'></picker>';
835: }
836:
837: template_colour_picker();
在第一个答案给出以下建议后
http://adminforum.in/index.php?thread/1079-colour-picker-for-elkarte/&postID=5438#post5438
编辑 -
检查元素
<title>Admin Forum - Index</title>
<link rel="stylesheet" href="http://localhost/elktest/themes/Silk_af_v155/css/index.css" id="index.css">
<link rel="stylesheet" href="http://localhost/elktest/themes/Silk_af_v155/css//ng-picky.css" id="ng-picky.css">
<link rel="stylesheet" href="http://localhost/elktest/themes/Silk_af_v155/css//af.css" id="af.css">
<link rel="stylesheet" href="http://localhost/elktest/themes/default/css/font-awesome.min.css" id="font-awesome.min.css">
<link rel="stylesheet" href="http://localhost/elktest/themes/Silk_af_v155/css/_silk/index_silk.css" id="index_silk.css">
<link rel="stylesheet" href="http://localhost/elktest/themes/default/css/portal.css" id="portal.css">
<link rel="stylesheet" href="http://localhost/elktest/themes/Silk_af_v155/css/_silk/custom_silk.css" id="custom_silk.css">
<div class="category_header forum_category" style="background:{{color | toHex}};"></div><style>
谢谢,它删除了错误。但是页面上没有选择器的迹象。 :( – Suresh
调试时, -element是否出现在生成的代码中?也许picker-directive没有正确包含? –
这是检查元素 – Suresh