Setup style linting in angular app.
Author Archives: Kumar Gandhi K
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.”
In webpack add a custom plugin to change the output of the template file.
For example say there is a scenario where you would like to change the title text in the template file. Our template file is a simple Html file with a title tag. For this you can create a custom plugin, in the plugin logic fetch the html content of the template file and use simpleContinue reading “In webpack add a custom plugin to change the output of the template file.”
Using Nintendo gaming console outside the allowed country.
I bought a Nintendo Switch lite few months back and I went through few hassles to setup my account on Nintendo and purchase games online. In this post I am going to explain how you can setup your account outside the allowed country / timezone by Nintendo and purchase games online. When creating the accountContinue reading “Using Nintendo gaming console outside the allowed country.”
Using bcrypt to store password in NodeJS.
Before starting the post I would like to assume few things: You have knowledge about NodeJS. You have setup sample NodeJS app using express and mongoDB In case you have no idea what I am talking about then its best to know about them. Few links below will help. https://nodejs.org/en/ https://expressjs.com/ https://www.mongodb.com/ Now let’s getContinue reading “Using bcrypt to store password in NodeJS.”