mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Add navigation from index.html troubleshooting guide
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user