Add navigation from index.html troubleshooting guide

This commit is contained in:
Lea Anthony
2022-07-14 21:13:02 +10:00
parent 69016c6c6f
commit 3ecd72d6c9
+15 -1
View File
@@ -94,4 +94,18 @@ Source: https://github.com/wailsapp/wails/issues/1233
Sometimes the generated Typescript doesn''t have the correct types. To mitigate this,
it is possible to specify what types should be generated using the `ts_type` struct tag. For
more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types).
more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types).
## When I navigate away from `index.html`, I am unable to call methods on the frontend
If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding
the following imports to the `<head>` section of any new page you navigate to:
```html
<head>
<script src="/wails/ipc.js"></script>
<script src="/wails/runtime.js"></script>
</head>
```
Source: https://github.com/wailsapp/wails/discussions/1512