Angular-mentions not work in ionic 4 and 5

angular-mentions Plugin

npm install angular-mentions

I install this plugin but not working. No error show in console. So please help me or share me any other way.

What have you tried? What code have you added to your project? Do you have a sample project you can provide? Kind of need something more to help debug.

I tried this plugin
=> GitHub - dmacfarlane/angular-mentions: Angular mentions for text fields.

I add this code Simple example
=>Add the module to your app.module imports:

import { MentionModule } from ‘angular-mentions’;

@NgModule({
imports: [ MentionModule ],

})

=> Add the [mention] directive to your input element: (HTML file)

p>Angular Mentions

=> Where items is a string array of the items to suggest. For example: (TS file)

items: string = [“Noah”, “Liam”, “Mason”, “Jacob”]

You might be adding it to the wrong module. Ionic provides lazy loading out of the box, so what ever component you’re adding to is probably split out into it’s own thing.

I add this app.module. I follow all the instructions but it doesn’t work. Have you know Angular mentions type plugin for ionic?

Nope, but the issue is most likely due to the things being split out into their own modules.

For example, I have an app.module in my app, but because I use lazy loading, I also have modules for each of my pages

Screen Shot 2021-04-16 at 10.08.17 AM

So if you have a setup like this, you need to add the angular-mentions module to the page you are trying to use it

No sir. I am not use this type of setup. I use this type of structure

I am simple use component structure. I add angular mention module in app module. so now what can i do?

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