Git Product home page Git Product logo

wails-angular-template's People

Contributors

taincer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

wails-angular-template's Issues

White screen after building

Hey there, when I try to build your template, it works fine, but whenever I try to add something into the frontend it gives me this error in console: Error: inject() must be called from an injection context

After trying this and this with no success, I tried adding into frontend/src/main.ts:

Wails.Init(() => {
  platformBrowserDynamic().bootstrapModule(AppModule)
    .catch(err => console.error(err));
});

like with wails v1, but the error change in: Cannot read properties of undefined (reading '_')

Is there a way to avoid this problem?

Also, I noticed that when I build your template into frontend/wailsjs/go/bindings.js, wails deos add you method into the file, but it doesn't add mine, added the same way as you. Is there a command I'm missing out?

Thank you!

Hot Reload doesn't work

I am working with Wails CLI v2.0.0-beta.14.
It works, but there is a problem - if I change something on frontend side it stops working with the following error:
image
The vendor.js file is really absence.
If I run npm run build this file doesn't exist as well, but index.html doesn't contain reference to it.
But as I change something, for example app.component.html it appeared in index.html:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Frontend</title>
  <base href="/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.css"></head>
<body>
  <app-root></app-root>
<script src="runtime.js" defer></script><script src="polyfills.js" defer></script><script src="vendor.js" defer></script><script src="main.js" defer></script></body>
</html>

But the dist folder doesn't contain it.
In case of npm run watch there are both vendor.js file and reference in the index.html to it.
But for some unclear reason wails dev produces dist without vendor.js but index.html which contains reference to it.
The current workaround is, and that's all I could find: run npm run watch manually in the additional terminal. Then I can modify frontend and the changes will be reflected constantly in the app.
Is it possible to fix it somehow? I'm not sure isn't it an issue of your template or this is a wails issue.
I work in the windows environment, but don't know does it matter or not.

wails dev not work

image

wails build work.

It will continue when press Ctrl + C , but the wails will auto quit.

image
image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.