Posts

Showing posts with the label angular step by step

Create Reactive form in angular

Image
  In angular we can create two types of forms 1. Reactive form 2.template based form In Reactive form  : all the codes handle in type script , no need to use ngModel to get and set value in control. we define form and formcontrolname for each control , and through formControl we get and set value .reactive form code is neat and clean when we have more complex structure or validation we should use reactive form . Template driven  : data binding is done via ngModel ,generally we can use this approach for simple form ,in this approach code became messy and very difficult to manage . Also in this approach difficult to handle all validation ,need more coding. So , I like to go with Reactive form approach instead of Template based. In our tutorial all forms will be reactive , but we can use both approach if required. I am going to create employee form which will have below fields : Employee Id ,Employee Name, email Id,Mobile Number,Password etc.. our final output will be a...

Create Angular project step by step

Image
    Dear Readers, This tutorial covers : Preparation of environment Creation of First angular project Run the default generated angular project creation of best architecture of project call apis with Http Create services for http call, error handling etc. Registration and login with JWT toke decode token and get data from token                                        I believe the good way to learn anything new is to do more practical instead of theory . So after a short description will go straight for practical. Lets see what is angular and why to use  : Angular is a JavaScript based application design development framework for creating SPA(single page applications). Its a framework means it provides us all the required elements which are needed to develop a SPA. To understand more details kindly follow the  https://angular.io/docs  . Preparation of environment :...