Skip to main content


Showing posts from May, 2022

Everything You need to About Angular Template Driven Forms

 Forms in Angular  Forms on html page and how angular can help you with those forms now on first side might be strange because form is something that you can simply submit server then keep in mind you are creating a single page application so there is no submit to the server instead you have to handle from through angular and if then you want to submit  something to server you will need to reach out via angular http  service. How angular works together with forms. This is html code of form which you might use nothing is angular specific about this code its normal html code placed in html document it will be displayed like this with the input for Name and mail     Now angular job now is to allow you to retrieve values which is entered here and also check some other things like  is the form valid did the user entered valid information all that will happen in javascript and in typescript or we can say angular side. So some how we have to pass these values which user enters so some how you

Angular Routing Compete Guide

 Routes can be added at 2 place 1. In routing file - app-routing.module.ts 2. Any Module file like - app.module.ts file  1. In routing file - app-routing.module.ts 1. If we define in any module then we have to create a const like this  This appRoute should be specific type of Routes and this should be imported from  This should hold a array because we will have multiple routes  and we will add all the routes to this array and each route is just a javascript object in this array.  But question is how such route should be configured in angular app. It should follow some specific pattern or specific structure to angular use it. and this structure always need a path  path : this is what is mentioned in url after your domain name and this should be string . Like it could be users route so it should be like this  {path: 'users'}  common mistake is that never add / in the starting route like {path:'/users'} When you reach this what should happen if we don't define then not