私はこの絵文字libが取得:指示文でangularjsにemoji picker libを使用する方法は?
https://github.com/one-signal/emoji-picker
私はおよそディレクティブを作る考えてきた、これは絵文字ピッカーを使用するための機能である:
$(function() {
// Initializes and creates emoji set from sprite sheet
window.emojiPicker = new EmojiPicker({
emojiable_selector: '[data-emojiable=true]',
assetsPath: 'lib/img/',
popupButtonClasses: 'fa fa-smile-o'
});
// Finds all elements with `emojiable_selector` and converts them to rich emoji input fields
// You may want to delay this step if you have dynamically created input fields that appear later in the loading process
// It can be called as many times as necessary; previously converted input fields will not be converted again
window.emojiPicker.discover();
});
、これはのHTLMの使用であり、絵文字:
<p class="lead emoji-picker-container">
<textarea class="form-control textarea-control" rows="3" placeholder="Textarea with emoji Unicode input" data-emojiable="true" data-emoji-input="unicode"></textarea>
</p>
角度のあるプロジェクトではどうすればいいですか?私を助けてくれてありがとう!
、通常、SOあなたが遭遇直接技術的な問題のためのより多くのかは、特定の質問https://github.com/one-signal/emoji-pickerこの絵文字ピッカーはjQueryに依存することなく書かれているので、余分な依存関係を避けることができます。このライブラリを使用して指示にラップすることを主張する場合は、角度の前にjQueryをロードする必要がありますが、他の角度のemojiライブラリが指示コードを整理するための出発点を見つけるのに役立ちます。 – shaunhusain