Welcome Guest Search | Active Topics | Sign In | Register

JSExtension in Angular 6 Options
Jessica_Suarez
Posted: Wednesday, August 21, 2019 9:13:26 AM
Rank: Newbie
Groups: Member

Joined: 8/13/2019
Posts: 3
Hello, good morning

I am trying to use the JSExtension in my Angular project as complement of my c# application.
On my c# project there are no problem, but when i try to implement it in my Angular project I get the "Cannot find name 'eoapi'." error.

Is there a node package to include in my project to make reference to the eoapi? or how can i make reference to and include the eoapi object in my component?

Using EO v19.1.40.0.

thanks in advance!



Jessica
eo_support
Posted: Wednesday, August 21, 2019 10:36:48 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

I am not sure if I understand your question. The variable "eoapi" only exists when you run the page inside EO.WebBrowser. If you run the page on a regular web browser such as Google Chrome, then it would not exist.

Thanks!
Jessica_Suarez
Posted: Thursday, August 22, 2019 10:56:28 AM
Rank: Newbie
Groups: Member

Joined: 8/13/2019
Posts: 3
Hi!,
thanks for your response :)

I did some tests using a single .js file, yes, as you mentioned it only exists when the page inside is running on EO.WebBrowser
My problem is when I want to include it using typescript and to build my angular project.

I think maybe I need to include an external single js file. I will try it..


Thank you so much!

Jessica
eo_support
Posted: Thursday, August 22, 2019 12:19:54 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

You can write code to test if eoapi exists before using it. See here for more details:

https://www.essentialobjects.com/doc/common/eo_js.aspx#check

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.