Setup eslint and prettier in angular app.

Before we start with the steps to configure eslint and prettier I would encourage readers to spend sometime to know about these and why we need them. Check below links for the reads. eslint prettier Lets start, goto the angular project on the terminal and follow below steps. Step 1 Above command installs the eslintContinue reading “Setup eslint and prettier in angular app.”

Restrict user from entering non-numeric inputs using a directive in Angular.

There must a requirement in any application to allow only entering numbers in text inputs. This can be solved by creating a directive with onKeydown event handler. And then adding this directive to input element. See below code sample. We add this directive to input element like below. When user tries to enter value otherContinue reading “Restrict user from entering non-numeric inputs using a directive in Angular.”