Ionic is the framework that aims to build Hybrid Application using HTML5, CSS and Angular. It requires “Cordova/PhoneGap” wrapper to access native platform controllers and to deliver “nativelike” experience. It uses WebView for rendering.
Angular provides two different approaches to handle user inputs through forms.
Template Driven Form: As name suggests, it is a template driven form or you can say, it is a native HTML based form. It is useful to handle simple user input operations, such as to Create a login form or a form with less controls, minimum logics or with minimum validations.
Form Control drives through angular “ngModel” directive. It is responsible for creating and managing form instance.
To add validation, we use the same html validation attributes like ‘required’, ‘minLength’ etc. Every time the…
Reactive form is very useful and powerful feature of Angular to build forms. It has built-in methods to manage form state and to validate form inputs as well. Form has following building blocks:
FormControl: Individual form Item, maintain status and validation rules.
FormGroup: Collections of FormControl, maintain status for collection of formControl.
FormArray: Array of FormControls.
I will not go deeper in this, will describe Form and it’s feature more on Angular Form article soon.
It is a best practise for developers to use stub or mock data while developing application. It saves time to build an application rather than waiting for api’s details from Backend team. It happen sometimes, frontend wait for Backend for the api details. So, to build application parallel and to save time, we start developing application with stub data with the mutual agreement with Backend team on api’s request and response structure.
# Live Demo — Click here
ng new application-name
Run above angular cli command to create application base. It creates basic project folder structure.