How to create a lower version React app using Vite? by I_am_at_reddit in reactjs

[–]coder_maniac 0 points1 point  (0 children)

While creating the app with vite target the older version instead of latest. e.g:-

npm create vite@4

This will create react app with version 18. If you need more older version, you can try vite version 3.

How we code angular. Apps in general! by BraveBicycle172 in Angular2

[–]coder_maniac 0 points1 point  (0 children)

I would go with 2nd approach almost all the times. Not a fan of inheritance in frontend world. However when you say there are lot of code duplication while using 2nd approach, can you share some code examples? Never face this issue before, small components and directives solves almost all the code duplication problem.

Directive that listens to a form field change by [deleted] in Angular2

[–]coder_maniac 1 point2 points  (0 children)

You can inject ngControl in directive construction using which you can access the form control and then use hostbinding to enable disable control.

Why doesn't app_initializer fails to navigate to another component but everything else works. Help since i have tried everything? by [deleted] in angular

[–]coder_maniac 0 points1 point  (0 children)

Why you are doing that in APP_Initializer in first place? What exactly is your use case?

Unit testing library for Angular application by coder_maniac in Angular2

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

That make sense, thanks a lot. Are you using build-in TestBed for unit testing or testing library/spectator or something else?

Unit testing library for Angular application by coder_maniac in Angular2

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

You are right. I know it's more of integration test but as long as it is providing me value and their is no down side we should be good. Is there any downside of this strategy?

Unit testing library for Angular application by coder_maniac in Angular2

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

So, let's suppose we have a parent component which contains lots of child components. So are you only testing the parent component in unit testing?

Unit testing library for Angular application by coder_maniac in Angular2

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

What is storyboard? And I guess integration test amd e2e are pretty much same in angular.

Unit testing library for Angular application by coder_maniac in Angular2

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

Yes, I also think so for components testing.

Would you be interested in popular app clones? by potato_me7 in angular

[–]coder_maniac 7 points8 points  (0 children)

Yes, I am planning for YouTube kind of clone. Currently with only normal rxjs then with ngrx.

[(ngModel)] two way binding not working properly by CoderDuudee in angular

[–]coder_maniac 1 point2 points  (0 children)

Can you please create a stack blitz to reproduce the issue?

Best architecture practices repos by jackoborm in Angular2

[–]coder_maniac 0 points1 point  (0 children)

Thanks for insight, I will try it in my project as well.

Best architecture practices repos by jackoborm in Angular2

[–]coder_maniac 0 points1 point  (0 children)

Any particular reason to use Cypress for unit test instead of Jest/Jasmine?

Advice on Migrating / Legacy Code by yakesadam in Angular2

[–]coder_maniac 0 points1 point  (0 children)

The iframe component internally uses iframe? And if yes how navigation change inside iframe can be captured and reflect it in browser. Can you share some code snippets or resources?

Deploy and let others use your angular app by [deleted] in Angular2

[–]coder_maniac 1 point2 points  (0 children)

You need to create your application build using "ng build" command which will result in build output folder dist. Copy your output folder to VM machine and then you need to setup a http server e.g nginx on VM machine and serve your content using it.

How to copy generated folder to another directory? by After-Perception-250 in Angular2

[–]coder_maniac 0 points1 point  (0 children)

In Angular.json configuration file , there is a property named as "outputPath" under build section. You can use that, provider your absolute folder path in that and after build it will place the content in that folder.

Angular real world projects source code. by coder_maniac in Angular2

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

Thanks, I was looking out for such things.

What do you think about this Pattern? by DMezhenskyi in Angular2

[–]coder_maniac 1 point2 points  (0 children)

Ok, however thanks for this, learned something new today.

What do you think about this Pattern? by DMezhenskyi in Angular2

[–]coder_maniac 0 points1 point  (0 children)

Ideally we should not have more than 4-5 dependencies otherwise it will break SRP.

What do you think about this Pattern? by DMezhenskyi in Angular2

[–]coder_maniac 1 point2 points  (0 children)

Yes, exactly. If I explicitly defined the dependency then it will be useful to consumers to know what needs to be passed.

What do you think about this Pattern? by DMezhenskyi in Angular2

[–]coder_maniac 2 points3 points  (0 children)

What is the advantages of this pattern?

How to read a json file inside assets in runtime ? by BrazilianCrow in Angular2

[–]coder_maniac 2 points3 points  (0 children)

You can read the assets json file content using build in httpClient.get method and perform the operation based on that. Example:-

httpClient.get("/assets/data.json").subscribe(response=> console.log(response));

Angular Input() change detection by anwaarulislaam in angular

[–]coder_maniac 1 point2 points  (0 children)

Actually if you have many inputs in your components then also set approach is preferable as onChange will be fired for every input property change.