Web / Angular Interview questions
What is JsonPipe?
JsonPipe is an inbuilt pipe that converts a value/object into its JSON-format representation. It is usually used for debugging.
{{ value_expression | json }}
<form [formGroup] = "profileForm" > <label> First Name: <input type="text" formControlName = "firstName"></label> <label>Last Name: <input type="text" formControlName ="lastName"></label> <div formGroupName="address"> <h4>Address</h4> <label>Street: <input type="text" formControlName = "street"> </label> <label>City: <input type="text" formControlName="city"> </label> <label>State: <input type="text" formControlName="state"> </label> <label>Zip: <input type="text" formControlName="zip"> </label> </div> <button type="submit" (click)="onsubmit()" [disabled]="!profileForm.valid"> Submit</button> </form> {{profileForm.value}} {{profileForm.value | json }}
More Related questions...