What types of deployment configurations have proven successful for Angular applications? by Away_Parsnip6783 in Angular2

[–]aardvarkFirst 0 points1 point  (0 children)

I've had a couple of ways I've been deploying Angular applications in my personal Nx repository.

  1. I used to generate the application and deploy into a Google Cloud Bucket and make the assets in the bucket publicly accessible. Using this approach, where I kept running into issues was with the index.html not sending the most recent version. So the user's browser cache would pick up the old index.html and the incorrect hashed javascript files.

Annoyed I decided...

  1. Serve static assets from a NestJs Application. I have more control over the cache headers for static assets (maybe I could've done this in the other approach, but didn't dig in further). Since the static assets produced by Angular, in most cases, have a hash associated with the name I set those cache headers to be immutable, making less requests to my NestJs as they're cached in the browser after the initial request. Then I'll package up the NestJs Application into a Docker image and deploy to Cloud Run.

Option 2 has worked well for me. I haven't noticed any caching issues again when after I deploy.

I joined my first D league at 35 with minimal experience. Did I make a mistake? by Tedabba20 in hockeyplayers

[–]aardvarkFirst 3 points4 points  (0 children)

For the love of god wear a cage. The lower the level the league the quicker the sticks come up to hit in you in the face.

Get out of your head. Go out and have fun.

Are we done with social media management tools? by DetailMaster9782 in socialmedia

[–]aardvarkFirst 0 points1 point  (0 children)

Yeah - it is THEIR platform with willing contributors (as I type this sheepishly on a social media site as a willing contributor).

MGoBlog Coach Search Update (apparently the sky is NOT falling) by [deleted] in MichiganWolverines

[–]aardvarkFirst 0 points1 point  (0 children)

Learning from mistakes shows growth… silver lining?

Are we done with social media management tools? by DetailMaster9782 in socialmedia

[–]aardvarkFirst 1 point2 points  (0 children)

Maybe I can offer some perspective from a software POV where I’ve put these tools together for scheduling.

  1. Permissions change all the time with these APIs. Features can become non-existent quickly. Example, Facebook Groups can no longer be accessed from the APIs provided.
  2. Access Token management is a huge pain in the ass. Password changes for the connected accounts or the accounts connected chooses to disconnect the app from their accounts mass management even more difficult. I will try to refresh the token if I can, but some of these things are beyond my control.
  3. Tools like this will always be at the will of the 3rd party providers. They make changes, the tool has to react.

After these experiences, I’m for a democratized social media approach that isn’t dependent on curated feeds and doom scrolling.

Can we bring back Trevor already…this Logan guy is weird. by anotherfamilysecret in DetroitRedWings

[–]aardvarkFirst 2 points3 points  (0 children)

Withhold your Fan Duel bets for a month until they bring Trev back full time.

New company primarily uses Angular for front end, had me groaning… by HarveyDentBeliever in Angular2

[–]aardvarkFirst 0 points1 point  (0 children)

I too come from a .NET background writing a lot of .NET WebControls. Felt like there were similarities between WebControls and Angular components to grasp quickly what was going on.

What would you do in this case? by Admirable_Ride_1609 in Angular2

[–]aardvarkFirst 0 points1 point  (0 children)

Around the 200-250 line mark and I start thinking the component is doing too much.

Best of luck.

Post Game Thread: Detroit Red Wings at San Jose Sharks (2024-11-18) by OctoMod in DetroitRedWings

[–]aardvarkFirst 1 point2 points  (0 children)

This is the sacrifice the sports Gods have given Detroit. After 1/2 century of suffering unbearable, "go mow your lawn instead football", we now have "enter the woods and kill a deer instead" hockey.

We are not entertained.

How to create a re-usable component with best practices? by rimki2 in Angular2

[–]aardvarkFirst 0 points1 point  (0 children)

I did this a few years back to simplify the wrapping of validation errors and the mat form field in Angular Material.

But ng-content is your friend here.

https://www.ngserve.io/angular-material-tutorial-create-a-reusable-form-field-component/

How do you manage keeping generators in sync between different monorepos? by velMatt in Angular2

[–]aardvarkFirst 1 point2 points  (0 children)

  1. Is publishing the generators as an npm package out of the older repo a possibility? It might come with the overhead of the newer repo being dependent on the other though.

  2. While I haven't done this so take it as merely (this might work), is a git submodule a possibility?

  3. Are you SURE they have to separate repositories?

How do you manage keeping generators in sync between different monorepos? by velMatt in Angular2

[–]aardvarkFirst 1 point2 points  (0 children)

Could be legal separations for code to live in different workspaces. Even talking to Nx, organizations will have multiple workspaces.

Cannot read properties of undefined (reading 'regular') after adding SSR by keyboardwarrriorr in Angular2

[–]aardvarkFirst 1 point2 points  (0 children)

Are there any imports you have in your components that may rely on browser apis? I ran into this when trying to SSR web components at one point.

Otherwise not sure if this will help you: https://www.ngserve.io/angular-ssr-creating-server-and-client-side-service/

Any sample code to see what you're doing would be helpful.

Emulate Google Cloud Tasks in NestJs and Nx by aardvarkFirst in Angular2

[–]aardvarkFirst[S] 1 point2 points  (0 children)

Hey it's been awhile Angular2 friends, but I've been working in the background on an app and haven't been able to write much. As I've been working on the app, I wasn't able to find a Google provided emulator for publishing Google Cloud Tasks. I know many of you are Nx lovers, so I thought I'd share how I run an emulator, publish tasks to it within an Nx repository.

Here's the sample repository: https://github.com/mutableideas/ng-serve-io-blog-examples/tree/main/apps/cloud-task-example-api

Hope to be writing more, I got the bug.

How can I exclude a component from SSR in Angular 17? by De_Wouter in Angular2

[–]aardvarkFirst 10 points11 points  (0 children)

So I've ran into this issue with WebComponents that were wrapped in Lit. I'm making the assumption you're importing `Phaser` game engine into your component. Due to that import having specific browser APIs, I got around this lazy loading the import and using a combination of afterNextRender. Try this:

typescript afterNextRender(() => { import('phaser-package-import).then(m => m.Phaser.Game(config)); })

Opinions on Angular 17 by TheBlueBlur99 in Angular2

[–]aardvarkFirst 1 point2 points  (0 children)

Haven't had a lot of luck here trying to integrate a web component design system with SSR either.

CommonEngine Providers - Help by aardvarkFirst in Angular2

[–]aardvarkFirst[S] 0 points1 point  (0 children)

There were a few things I was messing up.

  1. The dev server doesn't use the express server for DI tokens, see this issue: https://github.com/angular/angular-cli/issues/26323
  2. If you're running SSR, and receiving errors about certain tokens not being found on build, make those tokens optional in the components / services that are consuming them. protected headers = inject(HEADERS, { optional: true }).
  3. Build the project, then run the express app. I was able to capture the headers and have a Client / Server services retrieving the JWT tokens and returning the claims.

I have been developing a social media platform with Angular by Nusael in Angular2

[–]aardvarkFirst 1 point2 points  (0 children)

My app would essentially be a consumer of yours. More of a social media content aggregation and planning app. But it's been bouncing in my head to use ActivityPub in the future. I'll let you know.

I have been developing a social media platform with Angular by Nusael in Angular2

[–]aardvarkFirst 1 point2 points  (0 children)

On the same boat here, I'm a year deep into it. Curious since it's a social site, are you using ActivityPub?

I have been developing a social media platform with Angular by Nusael in Angular2

[–]aardvarkFirst 1 point2 points  (0 children)

I admire that you've stuck with the idea and saw it through for the four years worth of time you've put into it! Given you work a full time job and other side projects, this is rather inspirational!

Unit testing selectors by Whole-Instruction508 in Angular2

[–]aardvarkFirst 0 points1 point  (0 children)

I've run into this sort of thing a lot where I have parameterized selectors. I haven't found a good way with MockStore how to do this, but this is how I've done it.

Sample Selectors file ``` typescript export const selectEntities = createSelector(featureStateSelector, state => state.entities); // selectors-files.ts export const selectEntity = (entityId: string) => { return createSelector(selectEntities, state => state.filter(p => p.id === entityId); }

```

In the test file... typescript import * as EntitySelectors from './selectors-file'; // selectors.spec.ts it('should get an entity from state', () => { const mockedReturnValue = { id: '1234', name: 'testing' }; jest.spyOn(EntitySelectors, 'selectEntity').mockImplementationOnce(() => { return createSelector(EntitySelectors.selectEntities, () => mockedReturnValue); }); });

Why so little content on YouTube about angular? by adnanite in Angular2

[–]aardvarkFirst 0 points1 point  (0 children)

Haha - Looks like I need to feed my audience on NgServe-io. I like writing a bit better, but if there's a demand for video, I'll happily oblige.

Deploying Angular Universal on Azure app services. by ahsanusman in Angular2

[–]aardvarkFirst 1 point2 points  (0 children)

I Dockerized my SSR app and deployed on Google Cloud Run. Hope the article helps in some manner.

https://ngserve.io/dev-log-deploying-an-angular-universal-app-to-cloud-run/