A radio-button is an element that allows the user to choose only one option from a set. The below example is used to choose only one option from a gender set using Angular 5 Materia l . radiobutton.ts - import { Component } from '@angular/core' ; @ Component ({ selector : 'radiobutton' , templateUrl : 'radiobutton.html' }) export class Radiobutton { //Todo – Radio button } And radiobutton.html – < mat-card > < mat-card-content > < h2 > Pick Your Gender </ h2 > < section > < mat-radio-group [( ngModel )] = "Gender" > < mat-radio-button value = "Male" > Male </ mat-radio-button > < mat-radio-button value = "Female" > Female </ mat-radio-button > </ mat-radio-group ...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers