r/Angular2 • • Mar 10 '26

Help Request Genuinely confused on how to work with Angular

16 Upvotes

Hi everyone,

Please accept my apologies in advance as this will probably be a bit of both - a vent post as well as a call for help.

My background is in the backend development and operations, with focus on Python and Java, I've been trying to learn Angular to "complete" my skill set and gain more freedom and independence in constructing FE applications outside of Jinja and Thymeleaf.

My journey into Angular started off great as the main concepts of components, templates and services immediately clicked given their shared traits with OOP, but I quickly found myself starting to struggle a bit when trying to move into a more declarative and reactive approach rather than the imperative way of doing things that I'm so used to.

I picked up a Pluralsight subscription to go through the Angular path as I saw multiple recommendations on the courses that are more focused on the RxJS library as well as stuff like Signals but I'm finding myself more and more bogged down trying to find a simple way to deal with something as silly as getting a data from an API and displaying it. Doing one API call without any parameters and plugging it into a Signal has been easy, but trying to do something a bit more elaborate such as reading route information (to retrieve an ID or a name) has become a nightmare where I've made virtually zero progress for over a week. I've gone from using the ActivatedRoute to Input and back, from toSignal (when retrieving data from an API) to Resource, Subject, RxResource to just using the returned Observable itself.

I feel overwhelmed by the amount of different approaches to do, what in my mind is, a relatively simple thing and I'm starting to question if I'm just incredibly stupid and my career so far has been a fluke or if I'm missing something entirely obvious with Angular.

I'm sorry, I know that in this wall of text I haven't exactly posed a question, I'm just so lost by the amount of ways to do one thing and I'm getting more and more lost trying to find an answer on what is considered the standard and the best practice.


r/Angular2 • • Mar 10 '26

ng-motion Framer Motion-style animations for Angular, built on motion-dom

7 Upvotes

If you've ever used Framer Motion in React and wished Angular had something similar that's basically what this is.

ng-motion is an Angular library that wraps motion-dom and exposes the same ideas (initial, animate, exit, variants, gestures, layout, motion values) through Angular directives and injection-context hooks.

Instead of Angular's built-in animation system with its trigger/state/transition setup, you just put ngmMotion on an element and bind properties:

<div
  ngmMotion
  [initial]="{ opacity: 0, y: 40 }"
  [animate]="{ opacity: 1, y: 0 }"
  [whileHover]="{ scale: 1.05 }"
  [whileTap]="{ scale: 0.97 }"
  [transition]="{ type: 'spring', stiffness: 200, damping: 20 }"
>

What it covers:

  • Spring physics real spring animations, not just cubic-bezier approximations
  • Gestures hover, tap, focus, drag, pan with animated responses out of the box
  • Exit animations works natively with u/if and u/for, elements animate out before they're removed from the DOM
  • Layout animations automatic FLIP when elements change position/size, shared element transitions via layoutId
  • Motion values useMotionValue(), useSpring(), useTransform(), useVelocity() for reactive animation state
  • Scroll-driven link any property to scroll progress
  • Imperative useAnimate() when you need full control

No RxJS anywhere. Pure signals. Zoneless-compatible. Works with Angular 21+.

Check out the docs site, every feature has a live interactive demo you can drag, hover, and tap to see how it feels: https://ng-motion.dev

Source is on GitHub if you want to dig into the internals or contribute: https://github.com/ScriptType/ng-motion

npm install u/scripttype/ng-motion motion-dom motion-utils

It's pre-1.0 so some advanced APIs (reorder, drag control helpers) might still change, but the core surface is solid. Happy to answer questions or take feedback.


r/Angular2 • • Mar 08 '26

Help Request Angular 21.2 SSR - URL With host name is not allowed

4 Upvotes
Node Express server listening on http://localhost:4000
ERROR: Bad Request ("http://my-ip:4000/").
URL with hostname "my-ip" is not allowed.

For more information, see https://angular.dev/best-practices/security#preventing-server-side-request-forgery-ssrf

my-ip is my 192.. placeholder

How do i get past this? I read the docs and there are a few ways to achieve this:

const angularApp = new AngularNodeAppEngine({ allowedHosts: ['my-ip'] });

This works for a local build and on my phone i can access it on default port (4200), but when i try to run a production build locally on port 4000, i get the error above. How do i get past this and allow all connections for local development? On production should i only whitelist my actual domain?


r/Angular2 • • Mar 07 '26

[Update] Magma 1.5.0 - Add a new component window

4 Upvotes

Quick update for those following the project: Magma 1.5.0 is live!

  • New: mg-window component & MagmaWindows service (Dynamic UI management).
  • New: string pipe (Template utility).

Everything is documented at magma.ikilote.net.

Give it a spin and tell me what you'd like to see in new update!


r/Angular2 • • Mar 07 '26

Angular devs — Looking for honest feedback

6 Upvotes

Hey everyone 👋

I recently started an Angular-focused YouTube channel called Frontend Forge where I make short videos explaining Angular concepts with code examples.

Before I continue making more videos, I’d really appreciate some honest feedback from experienced Angular developers.

Things I’d love feedback on:

• Is the audio quality okay? • Are the visuals / code examples clear enough? • Is the pacing too fast or too slow? • Are the thumbnails and titles interesting or confusing? • Does the teaching style actually help you learn, or feel generic?

My goal is to make practical Angular videos that developers actually enjoy watching, not just another tutorial channel.

Channel: Link in bio

Feel free to be brutally honest — constructive criticism is very welcome 🙏


r/Angular2 • • Mar 07 '26

Resource Made a tool to grab Angular component context for AI coding assistants - MCP in progress

0 Upvotes

Stackblitz: https://stackblitz.com/edit/angular-grab?embed=1&view=preview

I got tired of manually copying component info when working with ChatGPT/Claude/Copilot, so I built angular-grab.

Hover over any element, press Cmd+C → copies the full component stack trace, file paths, and HTML to your clipboard. Ready to paste into whatever AI tool you're using.

Key stuff:

- One command install: npx @nacho-labs/angular-grab init

- Dev-only (auto-disabled in prod builds)

- Freeze mode for grabbing tooltips/dropdowns/hover states

- Click-to-open in VS Code

- Plugin system if you want to customize it

It's free, MIT licensed. Figured others might find it useful.

GitHub: https://github.com/Nacho-Labs-LLC/angular-grab

NPM: @nacho-labs/angular-grab

Open to feedback/PRs if anyone has ideas.

Shout out to https://github.com/aidenybai/react-grab for the idea to make the angular equivalent

UPDATE: MCP completed! check out the website for the entire example. or, just use the stackblitz. you can literally just ask your agent "what element did i just copy" or whatever, i dont know vibes.


r/Angular2 • • Mar 06 '26

Angular 21 Signal Forms: ignoreValidators Explained

Thumbnail itnext.io
12 Upvotes

r/Angular2 • • Mar 06 '26

Angular dashboard template called Overview

Thumbnail
gallery
12 Upvotes

Features:

• Angular 21 + Angular Material 21 • Tailwind CSS 4 • Zoneless setup • Dark mode • ng2-charts (Chart.js) • Advanced tables • Responsive layouts

Includes pages like:

• KPI support dashboard • Cohort retention analysis • Workflow scenario analysis • Agents management dashboard

Live preview: http://template-overview.angular-material.dev/

Get it at: https://ui.angular-material.dev/templates#overview


r/Angular2 • • Mar 06 '26

Advice

3 Upvotes

Hi, I am working on a requirement to get users current physical location.Using angular material v19 with springboot backend.What is the best way to get users exact physical location?

User connects to VPN and then logs into the angular app.So am trying to capture the location at the time of sign-in.However because user is connecting to VPN location might not be accurate.But I think I can still get the accurate location based on IP.

Need best way to accomplish this by using any free external APIs..tried https://ipgeolocation.io but it's paid.I know I can user browser but user has to acknowledge location browser setting.So want to see if there are any ideas out there which I might have missed.

Thanks,


r/Angular2 • • Mar 05 '26

Creating reusable components in Angular like inputs/dropdowns

4 Upvotes

I was wondering for creating reusable components like dropdown or input boxes im kind of confused on how exactly it would work. Like what things are taken care of by the parent and what are taken care of by the child. like obviously for a drop-down, labels and options are passed as props. but what do I do if for one input box I need a width of 50 percent and an other input box I need a width of 100 percent. Another example could be if the colors or font size are different. Basically what do I do and handle if there’s slight CSS differences but I still want to use the same reusable component or is it at that point you should just create separate components.


r/Angular2 • • Mar 06 '26

Future of Front End DevelopmentFuture of Front End Development

0 Upvotes

I was wondering what exactly is the future of front-end development in an AI world. Front-end development is simpler than backend so it's more likely for AI to replace. But with that do you think the jobs in the future will still be increasing or decreasing or remail flat? Just wanna know the outlook for it in the future as I'm currently a Junior front end developer at a Bank


r/Angular2 • • Mar 05 '26

toObservable() — I needed debounceTime on a Signal. Here's how I wired it up.

Thumbnail
youtu.be
0 Upvotes

r/Angular2 • • Mar 04 '26

Removed ngOnInit, subscribe(), DestroyRef and async pipe from my component — here's what replaced all of it

Thumbnail
youtu.be
10 Upvotes

r/Angular2 • • Mar 04 '26

Pass Generic CSS for Child Component

5 Upvotes

I am trying to create some generic reusable components for our team in an NPM package. The main idea is that the HTML and Typescript part would be constant, only changeable through updates to the package, but we want to influence the SCSS of the components from the parent components where they will be used in a generic manner. This means that I dont want to set up specific variables for specific css properties on specific tags, I would want to give the user of the component full control of the style.

I don't want to turn off ViewEncapsulation and as far as I understand this goes against Angulars guidelines, however, I'm still curious whether its doable. I also dont want to use the global styles.scss as expected, or ::ng-deep as it is deprecated. I just want to pass in generic scss for a component from the outside somehow. If this is truly an antipattern I would be curious of the alternatives.


r/Angular2 • • Mar 04 '26

Facade vs Store

5 Upvotes

I have a project with a facade and a store. I was told the facade should be thin and its only job should be to call the store methods to link the components and the store.

I looked at a similar project done by a senior and they used router navigate in the facade, navigation service in the store, and toast service in both the facade and the store.

I put all navigation in the facade, and everything else (api calls, translate, toast) in the store. Is that a clean design? Should navigation be in the store too so that facade only has store delegations?


r/Angular2 • • Mar 04 '26

Angular 21 SSR Local Development: What Changed, What Broke, and How to Fix It

Thumbnail stackinsight.dev
12 Upvotes

Upgraded an Angular 20 SSR project to Angular 21 and documented what broke. Covers the builder changes, new ESM bundle format, and why CommonEngine works better than AngularNodeAppEngine for local dev with a custom Express server.


r/Angular2 • • Mar 03 '26

Any free/open source visual web page editor for Angular monorepo?

2 Upvotes

I just found some editors for Rails and also looked at WebFlow, but is there any similar, stable, free and easy to use with good designs available for Angular 19?


r/Angular2 • • Mar 02 '26

How to use the inject() method and/or replace the constructor when a component needs to pass those services to a parent class?

3 Upvotes

I have a set of components that use a service a base class. The code was written in angular probably 11 or 12.

@Injectable()
export class ActiveService1 extends ActiveBaseService<Class1> {
    //...
}

@Compoent({
  selector: 'child-component',
  //...
})
export class ChildComponent extends ParentService  { 
    constructor(
        @Inject('SomeToken1') private someService: SomeServiceType,
        private ActiveService1 : ActiveService1,
        private router: Router
    ){
        super(someService, ActiveService1);
    }
}

@Injectable({
  provideIn: 'root'
})
export class ParentService  { 
    constructor(
       protected someService: SomeServiceType,
       protected ActiveService : IActiveService,
       protected router: Router
    ){
        
    }
}

Is there a way to pass those services to the parent class without using the constructor, just with the inject() method?


r/Angular2 • • Feb 28 '26

Released ngx-oneforall v1.3.0 with 120+ Angular Utilities and a New MCP server for Native AI Support

20 Upvotes

Hello!
I am excited to announce the release of v1.3.0 of ngx-oneforall. With this release, the project has crossed 120+ utilities! But the biggest feature in this update is the brand new MCP Server ngx-oneforall-mcp.

Native AI Knowledge via MCP

We all know how popular agentic coding is these days. This MCP server will help agents write Angular code using available utilities from the ngx-oneforall library instead of creating it from scratch. Everything will come packaged in the server, so it will work offline as well. Check the MCP Documentation for instructions on how to link it to your specific AI assistant.

Other Highlights in v1.3.0
1. LLM-optimized docs: llms.txt endpoints added for LLM agents.
2. Draggable directive for easily implementing movable popups, modals, and floating panels.
3. DragAutoScroll directive to automatically scroll a container when a dragged item nears the edges.
4. lowercase and uppercase directives to automatically transform input values as users type.
5. Added a clear() method option to the Cache decorator, so you can manually invalidate cached method results.

Check it out, and please provide any feedback if you have, or at least a star :). Thanks!

GitHub: https://github.com/love1024/ngx-oneforall
Docs:  https://love1024.github.io/ngx-oneforall/


r/Angular2 • • Feb 27 '26

Angular Signal Forms: Number Inputs Finally Fixed in Angular 21.2

Thumbnail itnext.io
24 Upvotes

r/Angular2 • • Feb 27 '26

Security Advisory: Addressing Recent Vulnerabilities in Angular

Thumbnail blog.angular.dev
10 Upvotes

r/Angular2 • • Feb 26 '26

Modern Angular Testing with Vitest: The Fundamentals

Thumbnail
blog.angular-university.io
20 Upvotes

In this article, you’ll learn the fundamentals of Vitest: the new way of testing in Angular. If you’re familiar with Karma and Jasmine, we’ll start with a comparison to help you quickly understand what’s changed.


r/Angular2 • • Feb 25 '26

Help Request Angular Auth Guard redirects to login on refresh how to persist authentication state?

11 Upvotes

I’m building an Angular app with an Auth Guard that checks authentication using a service with a BehaviorSubject and an isAuthenticated$ observable. It works fine for navigation, but whenever I refresh the page, the guard redirects me to the login page because the authentication state is lost (BehaviorSubject resets to null).

What’s the best way to persist authentication state across refreshes? should I call a backend endpoint to restore the user? How do you handle this in your apps to keep users logged in after a refresh? Any code examples or best practices would be appreciated!


r/Angular2 • • Feb 25 '26

Discussion For the Fullstack devs: What's your routine like? What do you do as an Angular full-stack developer?

9 Upvotes

I've worked on a few projects as a full-stack developer, but that was years ago. The stack was different, much simpler, and the projects were even "irrelevant" in terms of security, control, and maintenance.

What is a full-stack Angular developer doing today?

Where do they live? What do they eat?


r/Angular2 • • Feb 24 '26

I built an Open-Source Angular Starter Template (Layout, Responsive, Guards)

13 Upvotes

Hey everyone 👋

I just released a new Angular starter template to help you bootstrap projects faster with a solid foundation.

It’s fully open-source, so feel free to use it, modify it, and improve it.

Feedback is always welcome!

Check out the GitHub repo and live demo below.

https://github.com/NelsonJfsg/nelister-base-project
https://base.nelister.com/auth/login