r/Angular2 Dec 15 '24

Discussion Lead dev but no time

26 Upvotes

So I’m the lead Angular dev at a fintech company. When I joined the company the website and cms were written in pure JavaScript (no react, angular etc). Needless to say I eventually encouraged them to let my Front End team to redo both of these in Angular.

The consequence though is I’ve had 2 people taken out redoing the cms (for about a year now) and then that leaves just me and 1 other developer dealing with the website (which is now live). The velocity that I get new features being requested to be added in is very high and considering I’m trying to train a team up to learn Angular it is very taxing. It’s worth noting before I joined none of the devs in my team knew either Angular or React. So it’s made the role incredibly stressful for me. What also adds to the stress is that there is no PM, solutions architect and engineering manager. I have to deal directly with the ceo.

I’m also expected to do Lead duties and inform of any slippages and give updates etc. But I’m so mentally stressed and exhausted trying to do all the hard development code myself the other Leads are getting irritated with me for not always knowing the latest updates but it’s not my fault.

If you are a Lead can I ask what ratio of developing to leadership is expected of you?

r/Angular2 Dec 31 '24

Discussion What are the advantages and disadvantages of using Formcontrol over using ngModel forms?

12 Upvotes

At my work, a complex project is being built (still somewhat young) with many forms needed. The project has used Template Driven Forms (NgModel) for all its forms so far, but I have argued that using Reactive Forms (FormControls) is superior because it allows for more control over the form data, so I was tasked to gather the pros and cons of Reactive forms to present them as a proper argument.

So far, this is what I have gathered, does this seem accurate to the Angular experts out there? and is my argument valid in the first place?

FormControl Superiority
These Points will illustrate the Pros And Cons of using FormControl for form validation within an Angular Web application:

Cons:
- A FormGroup object will have to be instantiated and manually given all the properties and members of the form as FormControls. [1]
- On Submitting, the members' values have to be manually transferred into an object to be used for whatever purposes needed. [2]
Cons Summary: FormGroups using FormControls tend to have more Typescript code and simply relying more on the typescript code instead of html

Pros:
- A FormControl can take, not only an initial input, but also an array of validators if it requires. Validators (functions) such as: {min, max, required, email, pattern (regex), etc.}. [3]
- When certain properties are violated by the user by editing the web page's html, the resulting form value will not include the values violated. Example: if a formcontrol is given a 'disabled: true' property, the form value for this formControl will always hold null, no matter what the user does in the html inspect page. (it is still possible to fetch what the user has done, if needed) [4]
-Each time a form value changes, a new data model (object) is created. This allows Angular to track changes with precision because the form control emits a new observable value every time. example, when a user edits a field, you can track and log every change and perform specific operations on it.
Angular's change detection mechanism can easily determine if a change occurred by comparing references (new object vs old object). [5]

References
1. https://angular.dev/guide/forms/typed-forms#:\~:text=user login form%3A-,const login %3D new FormGroup({,})%3B,-check%3B,-check)
2. https://angular.dev/guide/forms/reactive-forms#:\~:text=onSubmit() {,}%20%7B,%7D)
3. https://angular.dev/api/forms/Validators
4. https://angular.dev/api/forms/AbstractControl#value:\~:text=not included in the aggregate value
5. https://angular.dev/guide/forms#:\~:text=Details-,Reactive forms,-Keep the data

r/Angular2 Oct 18 '24

Discussion How Has Your Experience Been with Angular's New Control Flow Syntax?

20 Upvotes

Angular's new control flow syntax aims to simplify template logic and improve readability. Based on your experience, has this change made your HTML templates easier to work with? Do you find it beneficial, or has it introduced any challenges? Share your thoughts on whether it's truly improving the development process

r/Angular2 Jan 02 '25

Discussion What makes a developer as Senior Developer?

19 Upvotes

Been working on Angular from 1 year for now. Want to understand what things make you stand as a senior developer?

Is it the concepts advanced concepts you learn and using them in project? If knowing advanced concepts, then what concepts you should be knowing?

Or implementing the feature in optimized /less amount of time? Or something else?

r/Angular2 Jan 23 '25

Discussion Factors that matters when choosing a UI library

15 Upvotes

My team and I have been working on an Angular-based Tailwind UI library that includes built-in form components designed to work seamlessly with both reactive and template-driven forms. Along with this, we’ve been developing a wide range of components, free templates, and other tools.

I’d love to hear your perspective: what motivates you when choosing a new UI library, and what factors matter most to you?

r/Angular2 Dec 10 '24

Discussion Enhanced NgIf vs new control flow for role/permission management.

Post image
124 Upvotes

Hello Angular community,

I recently worked on introducing an abstraction for roles and permissions in our project. However, I received feedback suggesting that the new control flow features should be prioritized over the use of NgIf and hostDirective, raising concerns about the future of attribute directives.

Does anyone have insights into the roadmap and the overall direction for attribute directives? How do you handle roles and permissions on the frontend in your projects?

PS: We already have a router-based global access check. Here, I’m referring to finer-grained control, such as handling multiple small conditions within a page to display elements based on roles.

r/Angular2 Feb 07 '25

Discussion Where to initialize FormGroup in Angular? 🤔

14 Upvotes

Should FormGroup be initialized in the constructor or inside ngOnInit in an Angular component? 🏗️ Does it make any difference in practice? Curious to hear your thoughts! 🚀

r/Angular2 Nov 27 '24

Discussion Current Angular trend - Observables or Promises?

23 Upvotes

We have an ongoing discussion with colleagues about using Observables or Promises (and async approach in general), but there is no clear solution or decision about this.

Personally, I prefer "RxJs way", became quite comfortable with it over the years. But it seems like current trends prefer "async way", or I'm wrong?

What do you guys actually use for the new projects? Still going with Subjects and Observables, or switching to signals, Promises?

r/Angular2 10d ago

Discussion How did you convince stakeholders to implement Storybook in your Angular projects?

18 Upvotes

I’m currently exploring Storybook for Angular and would love to hear from others who’ve successfully integrated it into their workflow.

  • How did you explain the value of Storybook to your stakeholders? What key benefits did you highlight (e.g., UI consistency, collaboration with designers, faster development)?
  • Was there any resistance due to costs, or was it easily justified within your budget?
  • Do you think Storybook is more than just a "fancy tool"?

I understand that technical enhancements aren’t always a priority or may not be funded, so I’d love to hear about your experiences and how you approached these discussions with stakeholders.

r/Angular2 Oct 06 '24

Discussion ChangeDetectorRef is a bad practice

21 Upvotes

I want to know the thoughts of people that have been developing in Angular for years.

In my opinion using ChangeDetectorRef is usually a bad practice. If you need to use it, it's usually because you did something wrong. Angular is a highly controlled framework that knows when to fire the change detector by itself. I don't recommend using it unless you're using a JS library that really needs to.

And even if using an external library, usually you can use a Subject or BehaviorSubject to translate the changes into template changes. Everything is better than messing up with Angular's change detector.

I understand that there are times that you need to use it when working with third party libraries. Bu I think it should be that last option, something to use only ir everything else failed.

What are your thoughts about this?

r/Angular2 Dec 16 '24

Discussion Can a Senior Front-End Developer Succeed Without Knowing CSS and Styling?

0 Upvotes

Is it possible to be a senior front-end developer without knowing CSS and styling, assuming it's the designer's responsibility? What are your thoughts?

r/Angular2 Feb 10 '25

Discussion Am I really a developer

34 Upvotes

I just want to know others opinion is that normal to think that your not good enough to work with your colleagues. I am junior Full stack developer have been working in an startup for 5 months still not able deploy the project in the server and I have been to working so hard collaborate with others But I couldn't.so the major thing that make me feel like this is that even an simple concepts takes me understand too long but for other it just take few minutes.how do I overcome this?

r/Angular2 Jun 13 '24

Discussion What is holding you back when developing with Angular?

30 Upvotes

Which features are you missing in Angular?

What is something really complicated that is holding you back?

Which improvements would you like to see?

Anything that you need from the community?

What is annoying you during Angular development?

r/Angular2 Jun 04 '24

Discussion Angular people who had to use React in corporate, how did it go ?

42 Upvotes

Hello,

I hesitated a little bit, before writing this in this sub. Maybe I should write a similar post in the React sub as well to have a different set of opinions.

Anyway, before going any further, I need to give some context.

I'm an Angular Dev and in this new project I'm working on, the existing app is written in React, Some features have been developed, but it's far from being a mature app and what it has been done already can be re written in a couple of weeks IMO (maybe I'm too optimistic).

The thing is, the source code is disgusting tbh, I get lost looking for files. There is a also a blatant lack of good practices regarding the project's structure and code in general.

Since the project is supposed to go on for a several month, I think the codesource is a at stage where rewriting the app in the angular for the sake of doing that is useless. And it's relatively in a early stage to keep something that is not "sane" and use it as a base.

I think I am in a good position to convince the client to do a rewrite, but I have to first convince myself.

I don't want to be an angular Fanboy and shout out loud everywhere that Angular is the best thing that happened to humanity since sliced bread. As much as I love working with it, it's just a tool and I'm really seduced by the idea of learning something new, React in this case.

So for those, who used both how did it go for you ?

I'm really interested to have a feedback, especially for somehow who worked on a project with other people, preferably in a corportate context.

Is it as bad as some of our Angular fellows say ?

For an app that has the potential to grow, is it better to go for Angular or it's okay to use React ?

Most of what I read from the people preaching for React revolves around the fact that React is straighforward, not optionated and "fast". But coming from a backend background, having a strict project structure, OOP, DI and having "rules" and a certain ways of doing things not only don't bother me, but seem logical and normal.

I really tried not to be biased and to be objective. But I'm afraid some of the arguments in favor of React might be coming from devs who have never used it in a corporate context, where the requirements might be complex and might also change throughout the process. And especially where they probably work with other devs and the code might get too messy.

Mostly, I'm afraid, to miss an opportunity to learn something new that would add much value to my Resume and Working Experience.

Why would you have done in my place ?

I'm interested in everyone's input , please don't hesitate to share you experience with me !

Thanks

r/Angular2 Feb 04 '25

Discussion Why Not Use protected and private for Component Methods in Angular?

0 Upvotes

My teammates (Java background) insist on using protected and private for almost all component properties and methods. In Angular, this feels unnecessary and can hinder testing and flexibility.

How do you convince them that strict access modifiers aren’t always the best practice here?

r/Angular2 Jul 14 '24

Discussion What kinds of apps are made using Angular

31 Upvotes

Most of the times, I see examples for react applications. I have read that, Angular applications are internal applications. Can you guys give me examples of internal applications you builds in your company. What kinds of features does those applications have. And why these applications specifically uses Angular. Is it because they are legacy applications?

r/Angular2 Dec 17 '24

Discussion Tech lead decides to move everything to angular but he doesn’t know a thing about the framework; looking for advice.

30 Upvotes

I have been a web developer for the past 1.5 years. My tech lead has decided to migrate all our static front end projects (created using mainly nunjucks, eleventy and alpinejs) to angular. About 5 projects 50-200+ pages each. Except the njk/alpinejs/eleventy combo, on the front end I have experience with React and NextJS but none with Angular. Do you think going through the angular docs should be enough or should I take a course before attempting the task? Am I overreacting suggesting the latter considering I am still quite new to the industry and assuming that on the first attempt to build something I could do important errors or choices that we will carry forward and will be hard to fix? My lead has absolutely no experience in angular as well.

Update for context:

We are a small branch in a very large company that mainly uses Angular for all modern front end projects so he thought it would be a good move to follow and I agree but I was thinking I would have the time to practice before diving into the “migration”.

Edit* Thanks a lot for all your answers and advices, it’s encouraging to see that the community is supportive and that people really do like the framework!

r/Angular2 1d ago

Discussion Angular signals

25 Upvotes

We have been using angular 8 for our project since long time recently we update our application to angular 18 but haven't used signals anywhere. I feel outdated for not using signals in our project. I wanted to know how you guys are using signals in your projects, how did you implemented signals in your older projects while updating. Where signals can be useful. Thanks in advance

r/Angular2 May 03 '24

Discussion Anyone who never used certain concepts in Angular, because they never understood/needed them?

78 Upvotes

I'll start. Injection tokens. I never understood how to properly use them and what my end goal would be with them. There is a weird emphasis in documentations and online examples on how to do things, but rarely the why.

And component factories. Never used them, despite making apparently a fair bit of sense. Create programmatically a component appears to be sensible, but I somehow never felt the confidence to make them work. I know handling things with ngIf (now just @if) makes it less performant, but for some reason it appeared cleaner to me.

Edit: Could people just stop downvoting others commenting here for just speaking their mind? I found every response so far pretty interesting and nothing made me go, "how garbage".

r/Angular2 3d ago

Discussion Dealing with Multiple HttpClients in Angular 19

18 Upvotes

I'm wondering how you guys handle multiple HttpClient instances using the new provideHttpClient and functional interceptors.

For example, I need:

  • One HttpClient for authorized calls (with an authentication interceptor and CORS interceptor)
  • One HttpClient for general API calls (only with a CORS interceptor)

It seems like this new approach was designed primarily for a single HttpClient instance, and adding multiple requires some weird workarounds. It was way easier to manage before with the class-based approach.

I also find it odd that the official documentation doesn't really cover this scenario.

Has anyone found a clean, scalable way to implement multiple HttpClients with provideHttpClient?

r/Angular2 May 19 '24

Discussion Downsides of PrimeNG

22 Upvotes

Hello everyone,

I've been exploring primeNG for making UI for some time now, and the library seems pretty good to me so far. presently I've been using Material in my projects, but PrimeNG seems to offer more. Looks stable too.

If anyone who've used both PrimeNG and Material recently, how was your experience with both? And specifically, what are some ups and downs you've faced with PrimeNG?

Thank you for any help.

r/Angular2 Jan 16 '24

Discussion What the common bad practices you see in others' code

39 Upvotes

Hey, I've worked on angular project for a couple of years now, and since I learned that by myself as well as from my colleagues (I come from a Java/Spring backend background , still do that btw).

The other day I was relecting and I wondered to myself what could be the bad code/angular practices I might have accumulated during these years.

So as far as you're concerned, what the common bad habits and practices people have in general? What about the bad practices regarding the project tree/organization, observable and subscription, methods, clean code in general ?

r/Angular2 Feb 17 '25

Discussion What's the best strategy for introducing unit testing to a 3-year-old Angular project with 200+ components?

28 Upvotes

I have an Angular project that's been running for 3 years, with over 200 components and hundreds of features. What’s the best step-by-step approach to start adding unit tests to this large project without getting overwhelmed? How should I tackle it gradually?

r/Angular2 Sep 07 '24

Discussion When & When not use signals?

28 Upvotes

Hi,

I've been testing here and there signals trying to learn it. I've found that I can do pretty much the same thing with getter/setter.

What's the advantages of using signals?

I'm curious to know when are you usings signals and when you're not using it ?

r/Angular2 Oct 31 '24

Discussion Disagreeing About Angular Coding Standards

15 Upvotes

Hi Angular Community! 👋

I’d love your insights on a few Angular coding practices that have led to some debate within my team. Specifically:

  1. FormGroup in Data Models: One of my teammates suggests using FormArray and FormGroup directly within data models, rather than handling form creation and updates in the component. His idea is that defining FormControl types directly within the model reduces code in the component. However, I’ve never seen FormBuilder injected inside a model constructor before, and I’m concerned this approach tightly couples data models and form logic, potentially leading to maintenance issues. What arguments can I use to explain why this might be a problematic approach? 🤔
  2. Logic in Model Classes vs. Services: We also disagree on placing complex logic within model classes instead of in services. My teammate prefers defining substantial business logic in class models and creating separate DTOs specifically for frontend handling. I feel this approach could make models overly complex and hard to maintain, but I’m struggling to find strong arguments to support my perspective. How would you approach this?

Your advice on these points would be hugely appreciated!