Skip to content

Commit 2eef808

Browse files
committed
fixing webview events example
1 parent 96cb40e commit 2eef808

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Diff for: app/ng-ui-widgets-category/web-view/events/web-view-events.component.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import { WebView, LoadEventData } from "tns-core-modules/ui/web-view";
1111
templateUrl: "./web-view-events.component.html"
1212
})
1313
export class WebViewEventsComponent {
14-
public webViewSrc = "https://www.nativescript.org/";
14+
public webViewSrc = "https://docs.nativescript.org/";
1515
public isItemVisible = true;
1616

1717
@ViewChild("webview") webViewElement: ElementRef;
1818
private firstUrl = "https://google.com/";
19-
private secondUrl = "https://www.nativescript.org/";
19+
private secondUrl = "https://docs.nativescript.org/";
2020

2121
public onLoadStarted(args: LoadEventData) {
2222
this.isItemVisible = true;
@@ -41,7 +41,11 @@ export class WebViewEventsComponent {
4141
message = "Error loading " + args.url + ": " + args.error;
4242
}
4343
console.log(message);
44-
44+
// >> (hide)
45+
setTimeout(() => {
46+
this.isItemVisible = false;
47+
}, 1000);
48+
// << (hide)
4549
}
4650
public onLoadFinished(args: LoadEventData) {
4751
let message;
@@ -65,11 +69,6 @@ export class WebViewEventsComponent {
6569
message = "Error loading " + args.url + ": " + args.error;
6670
}
6771
console.log(message);
68-
// >> (hide)
69-
setTimeout(() => {
70-
this.isItemVisible = false;
71-
}, 500);
72-
// << (hide)
7372
}
7473

7574
public loadFirst() {

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@
7575
"inject": "mdinject --root=app --docsroot=dist/code-samples --sourceext=\".ts|.css|.html\" --snippettitles=\"TypeScript|CSS|HTML\"",
7676
"archive": "node scripts/archive.js"
7777
}
78-
}
78+
}

0 commit comments

Comments
 (0)