我提前输入了两个值:
typeahead='product.product_code + \" \" + product.product_description for product in products'
理想情况下,我想更改产品说明的文本颜色,该颜色看起来似乎将两个值分开。
我可以通过CSS更改颜色,但这似乎仅用于显示的全文,而不仅仅是下半部分。
可以这样做吗?
更新:
找到了一种在我的输入字段中使用typeahead-template-url
的方法。
typeahead='product.product_code + \" \" + product.product_description for product in products 'typeahead-template-url='typeahead_popup.php'
在我的typeahead_popup.php
中是:
<a>
<span class="ng-binding">
{{match.model.product_code}}<span style="color:#25BE02;"> {{match.model.product_description}}</span>
</span>
</a>