How to create mat-button-toggle-group as read only mode in AngularJS ? Last Updated : 30 Nov, 2020 Comments Improve Suggest changes Like Article Like Report Angular Material is a UI component library developed by the Angular team to build design components for desktop and mobile web applications. In order to install it, we need to have angular installed in our project, once you have it, you can enter the below command and can download it. Installation syntax: ng add @angular/material Approach: First, install the angular material using the above-mentioned command.After completing the installation, Import ‘MatButtonToggleModule,’ from ‘@angular/material’ in the app.module.ts file.Then use <mat-button-toggle-group> and </mat-button-toggle> tags to create angular button toggle group.As the MatButtonToggleModule doesn't consist of read-only property, we can use the disabled property to make it read-only.Once done with the above steps then serve or start the project. Code implementation: app.module.ts: JavaScript import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { AppComponent } from './app.component'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { MatButtonModule } from '@angular/material/button'; import { MatButtonToggleModule } from '@angular/material/button-toggle'; @NgModule({ imports: [ BrowserModule, FormsModule, BrowserAnimationsModule, MatButtonModule, MatButtonToggleModule ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] }) export class AppModule { } app.component.html: HTML <mat-button-toggle-group name="techno" aria-label="technology"> <mat-button-toggle value="html"> HTML </mat-button-toggle> <mat-button-toggle disabled value="css"> CSS </mat-button-toggle> <mat-button-toggle value="javascript"> Javascript </mat-button-toggle> <mat-button-toggle value="jquery"> Jquery </mat-button-toggle> </mat-button-toggle-group> Output: Observation: If you clearly observe the above output, you can understand that you can't select and it is the way how read-only property looks like. Comment More infoAdvertise with us Next Article How to create mat-button-toggle-group as read only mode in AngularJS ? B bunnyram19 Follow Improve Article Tags : Web Technologies AngularJS AngularJS-Misc Similar Reads How to set radio button checked by button click in AngularJS ? In this article, we will see how to set the radio button checked by button click in AngularJS, along with knowing its implementation through the examples. Approach: The approach is to use the ng-checked directive to check the radio button in the DOM. In the first example, a single radio button is ch 2 min read How to set checkbox checked on button click in AngularJS? In this article, we will see how to set checkboxes checked with the click of a button in AngularJS. Approach: The approach is to use the ng-checked directive to check the checkbox in the DOM. In the first example, a single checkbox is checked by the button and In the second example, multiple checkbo 2 min read Angular Material Button Toggle Angular Material is a UI component library that is developed by Google so that Angular developers can develop modern applications in a structured and responsive way. By making use of this library, we can greatly increase the user experience of an end-user thereby gaining popularity for our applicati 4 min read <mat-radio-button> in Angular Material Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications. In order to install it, we need to have angular installed in our project, once you have it you can enter the below command and can download it. <mat 2 min read How to make a Bootstrap Modal Popup in Angular 9/8 ? In this article, we will see how to use the modal popup component of bootstrap in the Angular application. The addition of bootstrap in our Angular project is an easy process. The modal dialog box can be used to restrict the user to perform particular actions before they return to their normal use o 3 min read <mat-button> in Angular material Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications. In order to use it, we need to have angular installed in our project, after having it you can enter the below command and can download it. Installatio 3 min read How to add Buttons without Submit the Form in Angular? In Angular, when adding buttons to a form, their default behavior on click is to submit the form itself. However, there are certain situations in which it is necessary to create buttons for forms that provide some sort of functionality or trigger custom logic without triggering the default form subm 5 min read How to change the button color after clicking it using AngularJS ? Created an HTML button and the task is to change the background color of the button when pressing it with the help of AngularJS. This task can be accomplished using the ng-click directive that helps to toggle the display of the content when the button or any specific HTML element is clicked. Here, t 2 min read How to make sure clients have enough words in textarea by using angularjs in order to disable/enable a button? The Task here is to make sure that the user enters enough words in the Textarea. The button will be enabled or disabled on the basis of the word count entered by the client or user. Here the word limit will be set by admin of the project or Application. If word count lies between the parameter set b 4 min read How to Create Todo List in Angular 7 ? The ToDo app is used to help us to remember some important task. We just add the task and when accomplished, delete them. This to-do list uses various Bootstrap classes that make our web application not only attractive but also responsive. Approach: Create a new angular app using following command: 2 min read Like