Example of using FormArray in Angular.
Category Archives: Angular
Setup style linting in angular app.
Setup style linting in angular app.
Create a simple number formatter pipe in Angular.
Use a simple pipe in Angular to format any given number.
Export PDF in Angular with JSPDF.
Learn to export PDF in Angular with JSPDF. A tutorial to get you started.
Angular form validation using Bootstrap.
Before proceeding I request readers to have working knowledge about Angular (web application framework), keep a sample Angular project ready and also have Bootstrap installed on the project!. Now thats out of the way let us get started with post. Consider we have a form like below. And our form in template file will lookContinue reading “Angular form validation using Bootstrap.”
Create angular project in a specific version.
When we try to create a new angular project using the ng new command we get the angular project with version based on the global installed version of @angular/cli package. So a quick fix here is to update the global @angular/cli package to latest version or which ever version you prefer so when you createContinue reading “Create angular project in a specific version.”
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.”