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?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
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!
|