Welcome Guest Search | Active Topics | Sign In | Register

C# EO.WebBrowser caused intrenal navigate within angular web site Options
stack oveflow
Posted: Wednesday, March 15, 2023 7:17:22 AM
Rank: Newbie
Groups: Member

Joined: 3/15/2023
Posts: 0
I using EO.WEbBrowser to host Angular modern web site within old C# winforms application.
Search about any way to caused internal navigate within the site by event in c# app.
without caused to initialize and reset angular app

I try normal set the EO.WEbBrowser.WebView.URL property:
_webView.Url = "http://localhost:4200/app/page1"

But its behaving as new site navigate and all the angular app initialize events occurs again.

I prefer not using JS function in the angular app
and call it from C# by WebView.InvokeFunction Method.

Any other solution?
eo_support
Posted: Wednesday, March 15, 2023 10:24:00 AM
Rank: Administration
Groups: Administration

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

You must do this through Angular because Angular occurs within the page. If you do it through webView.Url then it occurs outside of the page and no Angular magic will occur.

In order to do it inside the page, you must do it through JavaScript. You can either have JavaScript function in your page and then call it through WebView.InvokeFunction, or you can use WebView.EvalScript directly without having to have a function in your page.

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.