The more frustrating problem you face in development, the more amazing solution you end up with.

In this article we gonna talk about a scenario when we want to set up our custom environment by neither changing local code nor pushing to repository.

Problem

As you know Angular provides us environment files where we can store our config. But we still fill those files by writing statically our secret keys or settings. What if due to security, we do not want to share our secret keys to repository? Or what if we want our custom settings in environment and still don’t want to push those changes? The first ideal solution comes to mind is to set up…


The more frustrating problem you face in development, the more amazing solution you end up with.

Angular reactive forms is a powerful module for managing our forms in web applications but sometimes to solve particular issue we may implement some unnecessary code without realizing there are already builtin solutions available. In this article we are going to review some of them.

emitEvent:

When we patchValue, setValue, enable or disable form we have additional option emitEvent, onlySelf to pass as parameter.

emitEvent is an event triggered when our form value or status changes. Hence in official documentation:

*emitEvent: When true or not supplied (the default), both the `statusChanges` and `valueChanges` observables emit events with the latest status and…

Vugar Abdullayev

Angular Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store