Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70449

Ionic EmojiPicker

$
0
0

@Asgeirr wrote:

I’m basically trying to add an emoji button to my application, using emoji picker for ionic 3, but when I click the button that calls the function it only shows a white rectangle (photo), I’m not sure if I have to enter the emojis manually or something like that , any help is grateful.
i use:
npm i ionic-emoji-picker --save

on app.modules

import { EmojiPickerModule } from 'ionic-emoji-picker';

@NgModule({
    ...
    imports: [
      ...
      EmojiPickerModule.forRoot()
      ],
    ...
})

on the html of the page:

<ion-input [(ngModel)]="message"></ion-input>

<button ion-button clear icon-only (click)="toggled = !toggled" [(emojiPickerIf)]="toggled" [emojiPickerDirection]="'top'"
  (emojiPickerSelect)="handleSelection($event)">
  <ion-icon name="md-happy"></ion-icon>
</button>

on the .ts of the page:

toggled: boolean = false;
message: string;

handleSelection(event) {
  this.message += event.char;
}

what i get whe run the app and click the icon:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>