Angular Form Generator & Pitfalls

Angular Form Generator & Pitfalls

Angular Form Generator & Pitfalls. Ever felt repetitive creating Forms in your Angular Application? From where I’m standing, presentation means those components that deal with UX. Business Object Configuration -> Angular Form Groups and Angular Form Controls.

Ever felt repetitive creating forms in your Angular Application? Let’s fix it.

Intro

During the Front-end development days it feels like there is a lot of repetitive code which I have to write to design my forms which are almost all the time very close one to another.

I’ve been recently looking into ways of automating it. The furthest I wanted to go was to have some kind of interface between a more friendly modelling object as well as to an interface to link my objects to the Angular Modelling Universe.

This way, I discovered there is already a library that could do it for me formly. But looking over their documentation I realized this is a little bit more than I wanted.

As a result, I ended writing my own form generator. You’ll see that except for two or three pitfalls this is rather easy to achieve.

Foreground

I’ll be using Angular Materials to generate my forms.

I have two tips to share about their design. It can be difficult to change the colors or design a theme for them. You’ll see the documentation on their side is rather not the best on this subject. My piece of advice, use  https://materialtheme.arcsine.dev/. In case you don’t know exactly what colors to use but you have a slight idea about it, I recommend using  https://www.cssportal.com/css-color-converter/0000D8. In the end you’ll definitely discover some very cool Angular Material Theme which you can even share with others.

Getting Started

First of all, we’ll organize our application on modules. When it comes to Angular I always split the code in presentation and business. From where I’m standing, presentation means those components that deal with UX functionality, they can work by themselves but they don’t make sense for a user taken alone; business are those components that configure and group together presentation through a context.

angular-forms angular typescript angular-formly

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Install Angular - Angular Environment Setup Process

Install Angular in easy step by step process. Firstly Install Node.js & npm, then Install Angular CLI, Create workspace and Deploy your App.

Angular 8 Forms | Angular Reactive and Template Forms

We will see mode-driven approach and template-driven approach in this angular forms. Angualr forms are very useful to get the feedback from the clients.

Decorator Based Reactive Forms in Angular 

Decorator Based Reactive Forms in Angular  - When working with forms in Angular, we are provided with two choices:-

Angular 11 Reactive Forms Validation Tutorial

Reactive form validation in angular 11 app. In this tutorial, you will learn how to use reactive form validation in angular 11 app.

Angular 10/9/8 Firebase CRUD Operations with Reactive Forms

Create a student record management system app using Angular 7|8|9, Firebase 5|6 Database, Reactive Forms, Form Validation, NGX-Pagination and NGX-Toastr.