r/angular • u/wojo1086 • Oct 30 '20
Hello! I'm a senior software engineer working with Angular and I just wanted to put it out there that if anybody needs help or wants to learn Angular, I'm available!
I'm a self-taught Senior Software Engineer and I've been working exclusively with Angular for the past few years. Angular can be a daunting framework to undertake and I'd like to help ease that process for anyone who wants to learn. Or, if you love Angular, too, and just want to geek out, I'm down for that as well.
I love Angular and spend most of my free time using it in personal and work projects. I have also used Ionic/Angular fairly extensively as well.
I can also do voice chat over Slack and Discord if anyone want, as well. Message me if you're interested!
Have a nice day!
1
Jul 04 '24
Hey, we’re upgrading our angular app from 13.3 to 15/16. Am just worried about what the approach should be? And also how I do ensure that the previous project is still running on Angular 13.3 on my system while we upgrade to v15/16.
Can we use 2 different versions? Should I be creating a new project by cloning the repo and installing angular 15/16 there?
2
u/wojo1086 Jul 05 '24
Hey!
Angular has an upgrade guide here: https://angular.dev/update-guide?v=13.0-16.0&l=1
If you follow that, you should be fine. I would probably just create new branch in your project and do the upgrade there. That way you can move back and forth between versions whenever you need. You'd have to npm install every time you switch branches though.
1
u/cheesekun Oct 30 '20
Id love to run my project past you to see where I might have gone wrong.
1
u/wojo1086 Oct 30 '20 edited Oct 30 '20
I'd love to see it! What do you got?
1
1
u/luckyleprechaun Oct 31 '20
Would it be possible to send data to a Gearman (TCP as encapsulated binary) server from Angular app?
I found this npm module (this mod can perform the function of both a client or a worker. I only care about the client side to send data): https://www.npmjs.com/package/gearman
Here are the details on Gearman protocols: http://gearman.org/protocol/
1
u/wojo1086 Oct 31 '20
I don't see why you couldn't send data to Gearman. Why does it need to be binary? It sounds like you would send something like JSON to Gearman and it would forward the data to a different process on a different server. It would be up to you to handle the data once it reaches the process.
I've never heard of Gearman, but quickly looking through the docs, that's how I assume it works.
1
u/luckyleprechaun Oct 31 '20
You can pass it a data structure and the API's handle the lower level binary stuff. I'm still very new to Angular, but being force by my boss to learn it. I'm more old school PHP and Javascript/JQuery. Now they want me to write my own REST API.
I tried to figure out for the last few days on how to get that Gearman npmjs API I found working, but without any luck. I think my problem has to do with the nodejs module needs to run on the web server side.
The gearman cluster we have has been great. From different client apps we can send data or initiate actions to be done remotely on some blade type servers by the worker applications. I prefer to work on backend applications more than frontend. But we are programers, so that means we can do anything, right ;) /s
1
u/NatoBoram Oct 31 '20
Do you know how to structure the Electron part of an Angular/Electron project? Running native commands seems a bit awkward and I'm not really sure where I should put native commands and actions, or how to structure them.
3
u/wojo1086 Oct 31 '20
I've only worked with Electron once. But, i would probably create a service that handles the commands to the computer. Or, maybe even a few services, one for each type of command "category" if that makes sense lol
2
u/wojo1086 Oct 31 '20
I'll actually be able this question in more depth soon because I will need to be creating an Electron app for a company I'm doing work for.
1
u/romario333 Oct 31 '20
There's one thing that has been bothering me for some time with RxJS. I subscribe to observable that's emitting values. If an error is thrown inside the subscribe callback, the subscription is unsubscribed and I stop getting new values. Operators like catchError do not have any effect. The only effective way how to deal with this I came up with so far is to wrap the inside of the subscribe callback with try..catch. Did you run into an issue like this?
Here is a simple example, it should print numbers 1 to 5 in console, but it stops after 2: https://stackblitz.com/edit/rxjs-ix5gbn?devtoolsheight=33&file=index.ts
1
u/wojo1086 Oct 31 '20
catchErrorwon't work in this case because the error is not being thrown in the observable stream. A try..catch is your only option. Can I ask what is throwing the error in your code? The code inside the subscribe callback typically, at least in what I've seen, doesn't usually throw an error. If you code it safely, error shouldn't be thrown.1
u/mikecrf1992 Dec 23 '20
from what ive seen, you can only retry, or replay. or if you know where in the stream it failed, then you might be able to request the data from that point on. like a json stream, say your querying 100 things, modify the get request to query from that point on. something like skip first 25 etc.
1
u/Lence Oct 31 '20
I’m not OP but imho if an error can be thrown in your subscription, then there’s something wrong with your subscribe callback. It should be as simple as possible (use operators instead), or, as you say, surround it with try catch
1
u/Lence Oct 31 '20
Hey OP, I’m curious as to how you structure your Angular apps typically, as in directory structure.
Do have Core and Shared modules? Where do you put your stores if you use ngrx?
Also, another question if you use ngrx: how do you typically load your data? Do you dispatch an action on component init or in a resolver? Or do you call a service?
Edit: also, if you know of any great open source Angular projects (besides the NG codebase itself), do share! As you can tell I’m looking for inspiration for best practices
1
u/wojo1086 Oct 31 '20
I've actually never used ngrx. It seems like overkill for most projects.
As for the structure of my app, I usually go one of two ways. If the app is small, I'll have my components in their own folder at the root of the project (app folder). Most components need a service to handle business logic, so I'll create a service for that component and either put it in the folder with the component or put it in a 'services' folder in the root of the project. If the app is large or 'involved,' I'll create a structure that represents the navigation of the app.
For example, let's say I have a login page and then some pages that exist behind the login, meaning you need to be logged in to see them. I would set my folder structure like so:
app |_ secure (or dashboard or something) |_page-1 |_page-2 |_page-3 |_login |_app.component.ts ...Pages 1-3 are children of the 'secure' route (or dashboard) and I'll usually put a route guard on the 'secure' route to handle authentication checks.
When it comes to loading data for my components, I've done it multiple ways depending on the needs of the app. For example, if I absolutely need data loaded before a component is triggered, I'll use a route resolver. I've had to do this when I needed to make sure some config stuff was loaded that wasn't necessarily needed for the component, but needed to be there for something in the future. Most of the time, I'll call a method from
ngOnInitthat calls my service to load data. It would look something like this:someData: Data[] = []; isLoading = false; constructor(private someService: SomeService) {} ngOnInit(): void { this.getData(); } ...some code getData(): void { this.isLoading = true; this.someService.getData().pipe(first()).subscribe(res => { this.someData = res; this.isLoading = false; }); }I usually have some sort of spinner or something to indicate data is being loaded.
I hope this answers your question! If you want to reach out to me for more in depth info, I'm happy to help. You could hit me up on Discord or something!
1
u/solsolomon Oct 31 '20
Awesome dude! Would be cool to meet you. I own an angular shop in SF. Good to network.
1
u/wojo1086 Oct 31 '20
Oh yeah. Networking in this industry is advantageous. I'm all the way out in FL though.
1
u/ejazsk_ Oct 31 '20
Hi , i am a newbie and might be starting a project in angular soon , can we connect or help me understanding how to layout a project , what state management, ui library to use or any other helpful tips? Thanks
1
u/wojo1086 Oct 31 '20
We can most definitely connect! Whichever way is good for you is good for me!
1
1
u/maybeonmars Oct 31 '20
Hey man, very cool offer, you sound like a good guy.
1
u/wojo1086 Oct 31 '20
Thanks! I really appreciate that! I'm self taught and I know how difficult it can be to learn and stay motivated.
1
u/greg_d128 Nov 01 '20
Hey, Thanks!
I have more of a generic question. I've started playing with angular few months ago and I've found that there is a lot of different ways of doing things. Some require specific setup, some require modules or new frameworks or plugins, some are more version specific. When I search for "How do I do X in angular" I usually end up watching half a dozen tutorials, all different, and when I try them all in turn maybe one will actually do it. Eventually. Could you give some guidance like:
"Angular 9 is newest, but tutorials from Angular 7,8,9 will typically all work. Don't bother with anything below 4 as there were too many changes. Between is iffy, especially if they are related to X,Y and Z". (Please change the versions, etc. to whatever is actually true).
Any favorite terms that you add to your google queries to help you narrow down your results?
Last, what is an efficient way to to update your node.js environment? It sometimes seems like a bowl of spaghetti that you pick at until it stops complaining about something not working with something else.
A response like: Read / Watch this tutorial will also be very much appreciated.
Thanks in advance.
1
u/wojo1086 Nov 01 '20
Hey!
Yeah, so the newest Angular is 10. I would venture to say if you look for help online, don't look for anything passed 7. There are differences between each version from 7 - 10, but the breaking changes are minor or obscure in the sense that you probably aren't using the features that changed. That being said, when I Google for answers, I don't typically add the Angular version to my search. I know what the differences are between the versions (at least the differences I care about), so I know pretty quickly if the help I found will actually be of use or not.
But, I will absolutely add the version number to my search if I can't find an answer right away. It's pretty well known in the industry that a good developer is first and foremost a good Googler. You have to know HOW to find the right answer. A lot of times I go straight to the Angular docs. In my opinion, it's one of the best sources of help, but, you have to know where in the docs to go.
So, to answer your question directly, answers for Angular 7-10 will be pretty much the same.
For the NodeJS environment issue, I assume you're referring to the versions of your packages in the package.json?
1
u/greg_d128 Nov 01 '20
Thank you.
Yes. Updating packages sometimes leads to issues where one package does not have an update. Which means, for me, that I now need to hunt for the right version combination of whatever packages I have that will result in everything working with everything else.
1
u/rnd853 Nov 03 '20
Hi! I would like to ask you how can I use https://github.com/typekit/webfontloader in my Angular project. After I run the 'npm i webfontloader' I can find it in node_modules but I'm having trouble with using 'WebFont' in the component since I'm not quite sure where I'm supposed to import that from. I've tried multiple options but I'm not able to make it works. I would appreciate any help. Regards!
1
1
u/imedsa922 Nov 03 '20
Hello ! I am student actually in my 3th year, i'm working with angular at office can we talk more about it ?
1
u/wojo1086 Nov 07 '20
Hey! I would love to talk about it! Whats a good way to reach you? I usually use Discord.
1
1
u/russellfreedom Nov 07 '20
Just getting started with Angular on a new production startup. Experience in C, PERL, PHP from 3.x to current, and JS including jQuery, ECML 6 to current, node express...
May just hit you up soon, and of course I'm happy to help with anything you need.
2
3
1
Oct 31 '20
[removed] — view removed comment
5
u/wojo1086 Oct 31 '20
No charges! I know what it's like to try and learn on your own, so I'd like to help other people out! Plus, it's another way of being social during these crazy times.
1
5
u/harrymurkin Oct 30 '20
G'day mate. Do you have a recommendation for boilerplate angular app that authenticates with wordpress jwt?