angular-mentions icon indicating copy to clipboard operation
angular-mentions copied to clipboard

View not working with ion-input directive [Ionic]

Open XavG opened this issue 4 years ago • 7 comments

Hi,

The module is easy to install and import in a Ionic/Angular Project, but as the directive is an and not simply a the view didn't work. A popup appear to the screen but it is empty and it stay forever (see picture)

image

Angular : 8.1.3 Ionic: 5.4.13 Angular Mention: 1.2.0

As soon as I replaced the directive into an it works.

20200902_114529

Can you / Will you adapt this module to Ionic ?

Thanks

XavG avatar Sep 02 '20 09:09 XavG

Can you clarify what you changed to make this work with Ionic?

dmacfarlane avatar Sep 02 '20 13:09 dmacfarlane

You just replace the directive like that

Basically, change <ion-input></ion-input> by <input/>

WORKING:

<ion-col size="10" class="input-col">
   <input [mention]="hashtags" [mentionConfig]="{triggerChar:'#',maxItems:10,dropUp: true}" autocomplete="true" spellcheck="true" [(ngModel)]="newComment" type="text" placeholder="Entrez votre message" name="message"/>
</ion-col>

NOT WORKING:

<ion-col` size="10" class="input-col">
   <ion-input [mention]="hashtags" [mentionConfig]="{triggerChar:'#',maxItems:10,dropUp: true}" autocomplete="true" spellcheck="true" [(ngModel)]="newComment" type="text" placeholder="Entrez votre message" name="message"></ion-input
</ion-col>

So I just DON'T use the Ionic directive. But I really need to use Ionic directive because some other features depend on it.

XavG avatar Sep 02 '20 15:09 XavG

+1

XavG avatar Sep 10 '20 09:09 XavG

+1

JoaquimDmt avatar Oct 29 '20 16:10 JoaquimDmt

it's correctly showing to me the list of user but when I click on a user in the list it doesn't write it.

JoaquimDmt avatar Oct 29 '20 16:10 JoaquimDmt

You just replace the directive like that

Basically, change <ion-input></ion-input> by <input/>

WORKING:

<ion-col size="10" class="input-col">
   <input [mention]="hashtags" [mentionConfig]="{triggerChar:'#',maxItems:10,dropUp: true}" autocomplete="true" spellcheck="true" [(ngModel)]="newComment" type="text" placeholder="Entrez votre message" name="message"/>
</ion-col>

NOT WORKING:

<ion-col` size="10" class="input-col">
   <ion-input [mention]="hashtags" [mentionConfig]="{triggerChar:'#',maxItems:10,dropUp: true}" autocomplete="true" spellcheck="true" [(ngModel)]="newComment" type="text" placeholder="Entrez votre message" name="message"></ion-input
</ion-col>

So I just DON'T use the Ionic directive. But I really need to use Ionic directive because some other features depend on it.

I use both of this but not work for me and no error show. Please share full code with ts file. @dmacfarlane @XavG

GhoshWorld avatar Apr 15 '21 13:04 GhoshWorld

You just replace the directive like that Basically, change <ion-input></ion-input> by <input/> WORKING:

<ion-col size="10" class="input-col">
   <input [mention]="hashtags" [mentionConfig]="{triggerChar:'#',maxItems:10,dropUp: true}" autocomplete="true" spellcheck="true" [(ngModel)]="newComment" type="text" placeholder="Entrez votre message" name="message"/>
</ion-col>

NOT WORKING:

<ion-col` size="10" class="input-col">
   <ion-input [mention]="hashtags" [mentionConfig]="{triggerChar:'#',maxItems:10,dropUp: true}" autocomplete="true" spellcheck="true" [(ngModel)]="newComment" type="text" placeholder="Entrez votre message" name="message"></ion-input
</ion-col>

So I just DON'T use the Ionic directive. But I really need to use Ionic directive because some other features depend on it.

I use both of this but not work for me and no error show. Please share full code with ts file. @dmacfarlane @XavG

My Issue was solved. I forget about declare component file in app module. Now its work perfectly.

GhoshWorld avatar Apr 26 '21 06:04 GhoshWorld