How to use the sapper/runtime.js.goto function in sapper

To help you get started, we’ve selected a few sapper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SamsungInternet / SamsungBluetoothWiFiManager / webapp / routes / wifi.html View on Github external
success = await Bluetooth.setWifiPassword(this.refs.wifipwd.value);
					}
					
					if (success) {
						const state = await Bluetooth.getNetworkState();
						console.log('state', state);
						console.log('status', state.status);
						console.log('ipAddress', state.ipAddress);
						this.store.set({ipAddress: state.ipAddress});

						success = state.status === Bluetooth.NETWORK_STATUS.COMPLETED;
					}

					if (success) {
						console.log('COMPLETED');
						goto('/redirect');

					} else {
						this.set({error: true});
					}
					
					this.set({waiting: false});
				}
			}
github SamsungInternet / SamsungBluetoothWiFiManager / webapp / routes / index.html View on Github external
.then(wifiSSIDs => {

						if (!wifiSSIDs) {
							console.error('No wifi SSIDs returned', wifiSSIDs);
							this.set({error: true});
						} else {

							console.log('Setting wifi SSIDs in Store:', wifiSSIDs);

							this.store.set({wifiSSIDs: wifiSSIDs});

							this.set({connecting: false});

							goto('/wifi');
						}
					})
					.catch(error => {