Closed nbvishwa closed 5 years ago
On navigating from the previous page, it is navigating to this current page but not loading the url provided.
HTML:
TS: ` import { Component, OnInit, ViewChild } from "@angular/core"; import { LoadEventData, LoadFinishedEventData, ShouldOverideUrlLoadEventData, WebViewExt } from "@nota/nativescript-webview-ext";
@Component({ selector: "Webview", moduleId: module.id, templateUrl: "./webview.component.html" })
export class WebviewComponent implements OnInit { // @ViewChild('mapWebView') webViewInterface: WebViewExt; webViewInterface : WebViewExt; constructor() { console.log("constructor"); }
ngOnInit(): void { console.log("init"); } public webViewLoaded(args: LoadEventData) { console.log("view loaded") if (!this.webViewInterface) { console.log('webview loaded'); // this.handleLoader(true); this.webViewInterface = args.object; this.webViewInterface.src = '~/www/content/web/viewer.html' ; this.webViewInterface.on(WebViewExt.loadFinishedEvent, (args2: LoadFinishedEventData) => { console.log('webview load finished'); // this.loadData(); }); // this.webViewInterface.on(WebViewExt.shouldOverrideUrlLoadingEvent, // (args2: ShouldOverideUrlLoadEventData) => { // console.log('webview override'); // args2.cancel = true; // }); } }
}
`
Working as expected & hence closing this
On navigating from the previous page, it is navigating to this current page but not loading the url provided.
HTML:
TS: ` import { Component, OnInit, ViewChild } from "@angular/core"; import { LoadEventData, LoadFinishedEventData, ShouldOverideUrlLoadEventData, WebViewExt } from "@nota/nativescript-webview-ext";
@Component({ selector: "Webview", moduleId: module.id, templateUrl: "./webview.component.html" })
export class WebviewComponent implements OnInit { // @ViewChild('mapWebView') webViewInterface: WebViewExt; webViewInterface : WebViewExt; constructor() { console.log("constructor"); }
}
`