Creating DESKTOP apps with Angular is easier than you think

  Рет қаралды 16,970

Joshua Morony

Joshua Morony

Күн бұрын

My Angular course: angularstart.com/
Getting a native desktop application up and running with Electron and Angular is surprisingly quick. In this video, we make use of these frameworks, in conjunction with Nx, to create the basic scaffolding required to create desktop applications with web tech
Get weekly content and tips exclusive to my newsletter: mobirony.ck.page/4a331b9076
Want to build mobile apps with Angular?: ionicstart.com
0:00 Introduction
1:01 Project structure
1:32 Setting up the project
2:27 Extra configuration
3:46 Improving DX
#angular #electron
- More tutorials: modernangular.com
- Follow me on Twitter: / joshuamorony

Пікірлер: 81
@ukaszmichalak7709
@ukaszmichalak7709 Ай бұрын
You can redefine angular's output not be nested in "browser" folder in angular.json using "options": { "outputPath": { "base": "dist/META-INF/resources", //some java specific path - not important "browser": "", "server": "server", "media": "media" },
@JoshuaMorony
@JoshuaMorony Ай бұрын
Thanks I'll give that a shot, I was under the impression it didn't work
@JoshuaMorony
@JoshuaMorony Ай бұрын
Can confirm this works without needing to switch builders! (to anyone reading this, just set something like "dist/apps/renderer" as the base and "" as browser
@HishamButeen
@HishamButeen Ай бұрын
I've already mentioned in my comment that it's working as expected with the below configuration: "builder": "@angular-devkit/build-angular:application", "options": { "outputPath": { "base": "public/web", "browser": "" }, ... }, An output example: is public/web/index.html. @JoshuaMorony, did it work for you? If not, I can share with you my repository privately.
@JoshuaMorony
@JoshuaMorony Ай бұрын
@@HishamButeen yes thank you, I was able to get it to work
@JamesJansson
@JamesJansson Ай бұрын
Definitely want to see more about Electron and Angular!
@rembautimes8808
@rembautimes8808 Ай бұрын
Oh yes I hope we can use electron to build iPad app with angular
@filipefreire6517
@filipefreire6517 Ай бұрын
Yes i want to see much more of this nx electron and angular
@filipefreire6517
@filipefreire6517 Ай бұрын
Working on my own editor
@nikolitilden8224
@nikolitilden8224 Ай бұрын
YES PLEASE DEEP DIVE INTO BUILDING ELECTRON APPS WITH ANGULAR!
@sickboy1776
@sickboy1776 Ай бұрын
Please do continue making more videos on working with angular and electron (especially in an Nx monorepo env) plus I'd love to see and learn working with native api's on electron you're the best!
@colemeyer1044
@colemeyer1044 Ай бұрын
Such an awesome video, and such a relevant topic. Please continue with this topic
@JoshuaMorony
@JoshuaMorony Ай бұрын
Next newsletter goes out tomorrow: mobirony.ck.page/4a331b9076
@ilyesbrh7667
@ilyesbrh7667 Ай бұрын
The explanation is so net & clean, thanks for the amazing video, please continue this series
@jeffnikelson5824
@jeffnikelson5824 Ай бұрын
amazing video really want to try it out myself now pls more of this ❤
@IgorBondarenko
@IgorBondarenko Ай бұрын
need more !!!! Nice video
@mohamedbenhamouda1155
@mohamedbenhamouda1155 Ай бұрын
Definitely it's a good idea "more Electron & Angular"
@Adridzukic
@Adridzukic Ай бұрын
Great stuff!!!
@Nemo-yt1gi
@Nemo-yt1gi Ай бұрын
good timing, was already considering redoing our angular application with electron. Publishing application updates though can be a bit tedious.
@deadlyecho
@deadlyecho Ай бұрын
I don't know why you have so few subscribers compared to these top notch quality angular content 👌
@captainmorgan8258
@captainmorgan8258 Ай бұрын
Hi Joshua! Great content as always! Can you please help me with my issue? Im trying to upgrade an application from Angular 16 to 17, and the problem is with new SSR approach i get "localStorage is not defined" error. What would be the best solution for that? Wrapping all uses of localStorage in smth to use them on the client side, moving away from using localStaroage at all (i have it quite a lot in the project) or maybe something else will help?
@lolobirolo
@lolobirolo Ай бұрын
IDK what happend but recently something shot to my mind that i need to build an electron app, then this happen! Thanks man! Definitely need more of this!
@eliotistube
@eliotistube Ай бұрын
Yes Joshua, more electron stuff please!
@Stevexupen
@Stevexupen Ай бұрын
Can you do comparison video comparing electron and tauri?
@cesarqp
@cesarqp Ай бұрын
Please more videos about Electron and Angular 👍👍
@eptic-c
@eptic-c Ай бұрын
I like more the approach of Wails or Tauri ( but prefer Wails because it is written in go ) and instead of having a whole browser for a simple app, it uses a WebView and it is much faster. Also, they have backends in statically compiled and more serious languages, go and rust compared to JS. I have no hate for JS, i just like to use it for what it was made for.
@souravsaraf1230
@souravsaraf1230 Ай бұрын
Nice video , can you tell what was the executable file size (.exe file size or whatever ur OS has) ? Also, will the app work without any setup steps if u just share the exe file with anybody ?
@JoshuaMorony
@JoshuaMorony Ай бұрын
The empty/default project in the video creates a package that is 431MB, and I don't know all that much about distribution/approaches steps yet. This video doesn't include the make process (although there is configurations for it by default) which I believe handles creating the actual installers.
@victorgarcia3526
@victorgarcia3526 Ай бұрын
What if you want ssr and a desktop app?
@dimakostyuk1508
@dimakostyuk1508 Ай бұрын
Thanks for the video! Are you considering Tauri as a desktop app framework instead of Electron?
@JoshuaMorony
@JoshuaMorony Ай бұрын
I'll probably see this project out with Electron, but I'll likely try Tauri out later (maybe I could try a rewrite)
@HishamButeen
@HishamButeen Ай бұрын
Great video! You can still use the application builder. "outputPath" will then be an object with a "base" property set to the folder you want, and a "browser" property set to an empty string. This will ensure it behaves exactly as you want and it won't create a browser folder anymore. On another note, the new media folder is internesting! Check it out if you haven't already. (N.B: Using latest angular release)
@JoshuaMorony
@JoshuaMorony Ай бұрын
Thanks I'll check it out, I was under the impression setting it to an empty string didn't work but I'll try that
@o_glethorpe
@o_glethorpe Ай бұрын
Great video. Nice to see there is a plugin for nx, back in the day, I built an electron app using angular 2, and it was a pain. Tks for sharing.
@JoshuaMorony
@JoshuaMorony Ай бұрын
I was very happy to see this plugin existed, would have saved me *a lot* of time figuring out how to get it all set up nicely
@benceszigeti5922
@benceszigeti5922 Ай бұрын
Definitely interested in more videos since, currently I'm working on an existing app that feels like outdated to me and my task is to insert an auto updater functionality for all Mac Windows and Linux but Im struggling to make it work since I also need to install azcopy as prerequisite during installation. I didnt know anything about electron before but now I definitely think I should create a new version and move everything to that v17 and it would save a lot of headaches for me.
@cuznerdexter
@cuznerdexter Ай бұрын
Been using Angular for years. Need to try using it again with Electron. 👍
@user-wz5qe7hc1v
@user-wz5qe7hc1v Ай бұрын
One gotcha i found when doing angular and electron together is ng test is broken if you import node packages in anything linked to any of your .spec tests. I ended up changing the name of tests of the electron portion of the app and testing those with jest. Let me know if you can find a better fix for that!
@toxaq
@toxaq Ай бұрын
I added an explicit node_modules alias to tsconfig for a similar problem I had.
@JayWolters
@JayWolters Ай бұрын
Dive, Dive, Dive!
@SiddharthSingh-mj4um
@SiddharthSingh-mj4um Ай бұрын
Hi Joshua , Do u have any full stack.Course , if not please make it ,
@JoshuaMorony
@JoshuaMorony Ай бұрын
Hey, no not really - Angular Start does include some stuff on integrating backends/Firebase/third party apis, but I wouldn't really call it a "full stack course"
@RomanBorowinski
@RomanBorowinski Ай бұрын
Good one. I wouldnt mind seeing how you integrate some of the native APIs into your app
@JoshuaMorony
@JoshuaMorony Ай бұрын
I'll definitely do a follow up vid with my actual app
@TheTom265
@TheTom265 Ай бұрын
Yes more Electron please 😊
@sushantkunkekar2155
@sushantkunkekar2155 Ай бұрын
Plz continue more on mono repo and electron JS
@MrMagrok
@MrMagrok Ай бұрын
Yeah, please more Videos about angular and Electron. Complex intercommunication and multiple renderer Prozesses in the background without a Window like vsc.
@dayronalfaro9461
@dayronalfaro9461 Ай бұрын
I always find electron very interesting but I always think what to build and what not to build, It would be nice to see a series starting with a good research about what to build what are the limitations etc, I always run to this channel to learn about the better way to do angulr apps heheh thx JM
@nejmaljamal1281
@nejmaljamal1281 Ай бұрын
Yes please
@razvan-mihaiilie7001
@razvan-mihaiilie7001 Ай бұрын
Played with the electron + Angular but your use of nx its kind of complicated
@tranquillityEnthusiast
@tranquillityEnthusiast Ай бұрын
I switched to tauri, because bundle size with angular with electron is huge
@JoshuaMorony
@JoshuaMorony Ай бұрын
I forgot about Tauri, will definitely check it out at some point
@KamelJabber1
@KamelJabber1 Ай бұрын
Yea please!
@TayambaMwanza
@TayambaMwanza Ай бұрын
Have you tried Tauri?
@JoshuaMorony
@JoshuaMorony Ай бұрын
No I hadn't considered it initially for this project but I'll likely give it a try at some point
@gamingxsvssdeva4245
@gamingxsvssdeva4245 Ай бұрын
try tauri too
@lukebennett3189
@lukebennett3189 Ай бұрын
Tied to subscribe to your newsletter, but I am getting a 500 response from the submit button
@Alex-bc3xe
@Alex-bc3xe Ай бұрын
Nice but I think flutter is a much better alternative for desktop apps and for sure faster
Ай бұрын
Electron is ok, but if you’re not afraid of writing just a little bit of rust, Tauri is sooo much easier to setup and use
@yanko694
@yanko694 Ай бұрын
Tried Tauri yet?
@akuoko_konadu
@akuoko_konadu Ай бұрын
We will love Tauri + Angular too 🌝
@wolfisraging
@wolfisraging Ай бұрын
Definitely continue this series, I have an idea, how about a chess/snake game built with angular which we're able to download and install on both MacOS, Windows & Linux using electron. :) Dream come true type of playlist you know.
@JoshuaMorony
@JoshuaMorony Ай бұрын
At least for now I'll probably do more vids by showcasing various aspects of the actual app I'm building with Angular/Electron
@wolfisraging
@wolfisraging Ай бұрын
@@JoshuaMorony Sure man, you know best! Never had a doubt
@koles32
@koles32 Ай бұрын
Isnt it better to just use PWA?
@JoshuaMorony
@JoshuaMorony Ай бұрын
In my case, I need Electron so that I access the native filesystem and run commands on the users machine
@toxaq
@toxaq Ай бұрын
Did you look at Tauri or Wails?
@JoshuaMorony
@JoshuaMorony Ай бұрын
I haven't properly looked a Tauri, I'm just aware of its existence and Wails I hadn't actually heard of. I am learning Go at the moment though so could be interesting.
@toxaq
@toxaq Ай бұрын
@@JoshuaMorony I fell into the Tauri hype train to try a demo app but found it a bit overkill for the benefit. Wails was more approachable but the docs are horendous.
@alanrutter3273
@alanrutter3273 Ай бұрын
I always enjoy your content and I completed your angular course but please SLOW down. It’s really hard to focus on what you’re doing or saying because it’s so damn fast.
@matejl92
@matejl92 Ай бұрын
Why not just PWA?
@JoshuaMorony
@JoshuaMorony Ай бұрын
For this particular app I need access to the native filesystem + the ability to execute commands on the users machine
@matejl92
@matejl92 Ай бұрын
@@JoshuaMorony I see, thanks for the reply. :)
@ivanmaglica264
@ivanmaglica264 Ай бұрын
Electron is awesome, don't let anyone else tell you otherwise.
@djsargex7777
@djsargex7777 Ай бұрын
Everything cool here cept for lame drake memes
@TheOnlyJura
@TheOnlyJura Ай бұрын
lost me at "electron"
@tleveque
@tleveque Ай бұрын
Constructive comment: I think you're going a way too fast. It is really hard to follow. This video should be twice as long. Do the same thing but in real time.
@Nagidid
@Nagidid Ай бұрын
Hey Josh, Im having this problem when running the 'npm install nx-electron electron-builder --save-dev' command: npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: @myorg/source@0.0.0 npm error Found: @nx/workspace@19.0.4 npm error node_modules/@nx/workspace npm error dev @nx/workspace@"19.0.4" from the root project npm error npm error Could not resolve dependency: npm error peer @nx/workspace@"^18" from nx-electron@18.0.1 npm error node_modules/nx-electron npm error dev nx-electron@"*" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error C:\Users\Usuario\AppData\Local pm-cache\_logs\2024-05-18T20_11_22_076Z-eresolve-report.txt npm error A complete log of this run can be found in: C:\Users\Usuario\AppData\Local pm-cache\_logs\2024-05-18T20_11_22_076Z-debug-0.log What should I do in this case?
@JoshuaMorony
@JoshuaMorony Ай бұрын
Looks like Nx 19 has just been released and your project is using that, so you would either need to use Nx 18 for now, or wait for nx-electron to be updated, or use --force/---legacy-peer-deps to just brute force past the error (which may or may not have ill effects)
ngTemplateOutlet is WAY more useful than I realised
16:36
Joshua Morony
Рет қаралды 72 М.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 36 М.
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 60 МЛН
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 10 МЛН
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 103 МЛН
Неприятная Встреча На Мосту - Полярная звезда #shorts
00:59
Полярная звезда - Kuzey Yıldızı
Рет қаралды 7 МЛН
The easier way to code Angular apps
9:54
Joshua Morony
Рет қаралды 64 М.
Senior Angular Developer Interview (theory)
41:57
WeCoded
Рет қаралды 9 М.
What’s new in Angular v18
20:08
Angular
Рет қаралды 101 М.
Native Desktop Apps with Angular and Electron
9:43
Fireship
Рет қаралды 250 М.
Why didn't the Angular team just use RxJS instead of Signals?
8:15
Joshua Morony
Рет қаралды 88 М.
How to structure your Angular apps like a Googler
10:58
Joshua Morony
Рет қаралды 81 М.
Why I decided to switch to the inject() function in Angular
6:10
Joshua Morony
Рет қаралды 54 М.
`const` was a mistake
31:50
Theo - t3․gg
Рет қаралды 125 М.
🚨 Angular 18 Is Out: Zoneless Upgrade (Step-By-Step)
14:36
Angular University
Рет қаралды 12 М.
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 60 МЛН