Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Directive does not work #13

Open
hamidhadi opened this issue Jun 28, 2016 · 7 comments
Open

Directive does not work #13

hamidhadi opened this issue Jun 28, 2016 · 7 comments

Comments

@hamidhadi
Copy link

When I add this line of code to my project, I don't get any emoji picker and the span is empty.
<span style="margin: 0 20px;" emoji-picker="fidiPlusPost.Message" placement="right" title="Emoji" recent-limit="12"></span>

But it's generated the i tag, however, it's not showing me anything.

@terranisu
Copy link
Owner

terranisu commented Jun 28, 2016

Hi @hamiid. Thanks for your feedback. I'll try to look into it, but I can't tell you when exactly :(

@hamidhadi
Copy link
Author

Hi @terranisu. Thanks for your response.

@ulurusolutions
Copy link

i had that issue until i added the css lib/angular-emoji-picker/dist/css/emoji-picker.css
check to ensure that it is added

@sauldeleon
Copy link

Hey!
@hamidhadi @terranisu any news about that issue? I am having the same trouble.

As @ulurusolutions said, I have checked the emoji-picker.css is being downloaded and libraries is being loaded.

I am using Angular 1.6, maybe an version trouble?

Thanks in advance!

@RomanGalochkin
Copy link

RomanGalochkin commented Jun 27, 2017

In my case it did not work because in the template "templates/emoji-button-bootstrap.html" were used old Angular UI Bootstrap directives.

I fixed it like this:

angular.module("templates/emoji-button-bootstrap.html", []).run(["$templateCache", function ($templateCache) {
	$templateCache.put("templates/emoji-button-bootstrap.html",
		"<i class=\"emoji-picker emoji-smile\"\n" +
		"   uib-popover-template=\"'templates/emoji-popover-bootstrap.html'\"\n" +
		"   popover-placement=\"{{ !placement && 'left' || placement }}\"\n" +
		"   popover-title=\"{{ title }}\"></i>\n" +
		"");
}]);

@sauldeleon
Copy link

Thanks!! I will try it like you did!

@taiebme
Copy link

taiebme commented Oct 26, 2017

I replaced directive template within a decorator, like this:

`// get the angular-emoji-picker module
    angular.module('vkEmojiPicker').config(emojiPickerConfig)

function emojiPickerConfig($provide) {
    $provide.decorator('emojiPickerDirective', emojiPickerDecorator);

    function emojiPickerDecorator($delegate) {

        var directive = $delegate[0];

        directive.templateUrl = "template-path/your-template.html";

        return $delegate;

    }
};`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants