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 restrict your logged In page in angular (authentication guard)

How to notify about data update to other component.