Top Angular Material frequently asked interview questions.
- What is Angular Material?
- What are some features of Angular Material?
- How can we use Angular Material?
- What are the types of Buttons in Angular Material?
- What are Angular Material Layout Directive?
- What is Angular Material Menu?
- How do we apply a directive conditionally?
- How can we set default option in mat-select?
- How can we add icon to mat-icon-button?
- How can we set the color of an icon in Angular Material?
What is Angular Material?
Angular Material is a library for all Angular JS Developers. It helps in Constructing, Consistent, and Functional Web pages and Apps through adhering to modern web design principles such as browser portability, graceful degradation, and device independence,What are some features of Angular Material?
Some of the features of Angular Material are as follows:- It includes features such as Cards, Toolbar, Speed Dial, Side Nav, Swipe, etc.
- It has Standard CSS with the minimal footprint.
- It has inbuilt designing.
- Has cross-browser, which will be used in creating reusable Web Components.
- It include new versions of Interface Control like Buttons, Check Boxes, and Text Fields.
How can we use Angular Material?
There are 2 ways for using Angular Material:
Local Installation - We can download all the material libraries by using jspm, npm and include it in our HTML Code.
CDN Based Version - We can put all js files in our HTML Code from Content Delivery Network.
What are the types of Buttons in Angular Material?
Types of Buttons in Angular Material are as follows:Basic Buttons
Raised Buttons
Stroked Buttons
Flat Buttons
Icon Buttons
Fab Buttons
Mini Fab Buttons
What are Angular Material Layout Directive?
Angular Material Layout Directive' assignable values are as follows:Rows - items which are placed horizontally with max width.
Columns - items that are placed vertically with max width.
What is Angular Material Menu?
Angular Material Menu helps in displaying options within the context of the actions which are performed. It contains 2 elements:Trigger Element - used for triggering elements.
md-menu-content - helps in representing the content of the menu.