important functions for angular

Set value in local storage:- localStorage.setItem('key', 'value');

Get value from local storage:- localStorage.getItem('key');

call function on focus loss:- (blur)="functionName()"

Loop through all the html form controls:-
 Object.keys(this.form.controls).forEach(key => {
this.form.get(key).markAsDirty();  //this function will make dirty all the form controls
});

Comments

Popular posts from this blog

how to save images with angular nodejs

How to add splash screen and app icon with ionic capacitor angular android app