পৃষ্ঠাসমূহ

Search Your Article

CS

Pageviews

Showing posts with label Angular Material Tutorial. Show all posts
Showing posts with label Angular Material Tutorial. Show all posts

Thursday, February 9, 2017

Angular Material - Overview

What is Angular Material?

Angular Material is a UI component library for Angular JS developers. Angular Material's reusable UI components helps in constructing attractive, consistent, and functional web pages and web apps while adhering to modern web design principles like browser portability, device independence, and graceful degradation.

Angular Material - Environment Setup

How to Use Angular Material?

There are two ways to use Angular Material:
  • Local Installation - You can download the Angular Material libraries using npm, jspm, or bower on your local machine and include it in your HTML code.

Angular Material - Autocomplete

md-autocomplete, an Angular Directive, is used as a special input control with an inbuilt drop-down to show all possible matches to a custom query. This control acts as a real-time suggestion box as soon as the user types in the input area.

Angular Material - Bottom Sheet

$mdBottomSheet, an Angular Service, is used to open a bottom sheet over the application and provides a simple promise API.

Methods

S.N.Method & Description
1$mdBottomSheet.show(options);
Show a bottom sheet with the specified options.

Angular Material - Cards

md-card, an Angular Directive, is a container directive and is used to draw cards in angularjs application. Following are the angular directives and classes used in md-card.

Angular Material - Widgets

Angular Material provide a rich library of UI widgets allows users to have advanced interaction capability with the application.

Angular Material - Layouts

Layout Directive

layout directive on a container element is used to specify the layout direction for its children. Following are the assignable values:

Angular Material - Inputs

The md-input-container an Angular directive, is a container component to contains any <input> or <textarea> element as a child. md-input-container also supports error handling using the standard ng-messages directives and animates the messages using ngEnter/ngLeave events or the ngShow/ngHide events.

Angular Material - Icons

The md-icon an Angular directive, is a component to show vector-based icons in application. It supports icon fonts and SVG icons also apart from using Google Material Icons.

Angular Material - Grids

The md-grid-list an Angular directive, is a component for laying out content for varying screen sizes. A grid has 12 columns in the desktop size screen, 8 in the tablet size screen, and 4 in the phone size screen, where each size have predefined margins and gutters. Cells are laid out in sequential manner in a row, in the order they are defined.

Angular Material - SideNav

The md-sidenav, an Angular directives is used to show a container component which can be shown or hide programmatically. It slides out over the top of the main content region by default.

Angular Material - Fab Speed Dial

The md-fab-speed-dial an Angular directive, is used to show a series of popup elements or buttons for quick access to common actions.

Attributes

Angular Material - Subheaders

The md-subheader, an Angular directives is used to show a subheader for a section.

Example

The following example showcases the use of md-subheader showcase uses of subheader component.
am_subheaders.htm
<html lang="en" >

Angular Material - Swipe

Swipe functionality is meant for mobile devices. Following directives are used to handle swipes.
  • md-swipe-down, an Angular directives is used to specify custom behavior when an element is swiped down.
  • md-swipe-left, an Angular directives is used to specify custom behavior when an element is swiped left.

Angular Material - Switches

The md-switch, an Angular directives is used to show a switch.

Attributes

S.N.Parameter & Description
1* ng-model
Assignable angular expression to data-bind to.
2name

Angular Material - Theme

Angular Material Components uses intention group classes like md-primary, md-accent, md-warn and additional classes for color differences like md-hue-1, md-hue-2, or md-hue-3. Following components supports use of above mentioned classes.

Angular Material - Toasts

The Angular Material provides various special methods to show unobtrusive alerts to the users. Angular Material provides a term toast for them and $mdToast service is used to show toasts.

Angular Material - Typography

Angular Material provides various typography CSS classes which can be used to create visual consistency across Angular JS application.
S.N.Class Name & Description
1md-display-1
Shows the text with Regular 34px.

Angular Material - Virtual Repeat

md-virtual-repeat-container

md-virtual-repeat-container is the scroll container for the md-virtual-repeat component.

Attributes - md-virtual-repeat-container

S.N.Parameter & Description
1md-top-index
Binds the index of the item that is at the top of the scroll container to $scope. It can both read and set the scroll position.

Angular Material - WhiteFrame

Angular Material has several special classes to display containers as paper-like cards with shadow.
S.N.Class Name & Description
1md-whiteframe-1dp
Styles a container for any HTML content with 1px bordered shadow. Adds z-depth of 1.