Chat plugin for Angular App

Status
Not open for further replies.

markphsd

Free User
Joined
Oct 16, 2022
Messages
7
Reaction score
0
Hi,
Is there a way to use the chat code snippet inside an Angular 14 component?
Currently, I can put it in the HTML of an angular app, however, that is limiting. I can't control the variables of the link by placing it in the angular index.html file.
If I could put in a component, as the call-u-selector allows, that would be great. Currently, I can't use the chat plug-in because of this limitation.
Thanks so much!
 
Hello Markphsd,
As I know, it shouldn't be a problem. Could you explain about limitations in more detail please?
 
Okay, I'll try not to over-explain. I"m not sure how familiar you are with Angular or its components; hopefully, it will be clear.

The call-us-selector accepts inputs, but for Angular, I'm stuck with hardcoded inputs. I can't use the call-us-selector in the angular app itself. I can only use it in the index.html, and while it gets compiled with the app, it lives outside of the Angular Bootstrapped section. So it works but is limited to the hardcoded URL I provide pre-compiling it.

So the limitation is that I can't apply custom inputs. For example, if I want to have the same app but distributed to a few different domains, using different URLs for each of the domains, for the chat.

To compare to Wordpress: I have 2 Wordpress sites that are hosted on different domains the word press plugin allows me to go to Wordpress, install the plugin, and apply the link from the 3cx Dashboard. So 2 different Wordpress sites, with their own 3cx URLs.

So in the attached image, you can see what I'm talking about with Angular.

So the question is there a way to resolve this? Usually, when I'm using a third-party code, I might get something from an npm package, or I can write a library myself that can be installed as an npm. In that npm. Using that imported library I can then use the widget, or selector by importing in the component into the ngModule and referencing it.

like import { callus} from './callussource';
That is done in the typescript, and then the variables are set up in the typescript.

Then in the Angular HTML selector, I would have something like this:

<call-us-selector [phonesystemurl]='mywebsiteurl' [party]='mycoolparty'></call-us-selector>

Does that make sense?
 

Attachments

  • Angular Chat Plugin.png
    Angular Chat Plugin.png
    164.5 KB · Views: 16
Oh, also, the wordpress plugin has the feature to control what pages the component appears on. That's also a needed option.
Basically I just need to make the selector like an angular component.
Thanks again for your time!
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,973
Messages
590,075
Members
164,895
Latest member
jasonkkrause