SlideShare a Scribd company logo
Angular Material
i
Angular Material
i
AbouttheTutorial
Angular Material is a UI component library for Angular JS developers. Angular Material
components help in constructing attractive, consistent, and functional web pages and web
applications while adhering to modern web design principles like browser portability, device
independence, and graceful degradation. It helps in creating faster, beautiful, and responsive
websites. It is inspired by the Google Material Design.
Audience
This tutorial is meant for professionals who aspire to learn the basics of Angular Material and
how to use it to create faster, beautiful, and responsive websites. This tutorial explains the
fundamental concepts of Angular Material.
Prerequisites
Before proceeding with this tutorial, you should have a basic understanding of Angular JS,
HTML, CSS, JavaScript, Document Object Model (DOM), and any text editor. In addition, it will
help if you know how web-based applications work.
ExecuteAngularMaterialOnline
For most of the examples given in this tutorial, you will find a Try-it option. Use this option to
execute your Angular Material programs then and there and enjoy your learning.
Try the following example using the Try-it option available at the top right corner of the
following sample code box –
<html lang="en" >
<head>
<link rel="stylesheet"
href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-
material.min.css">
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-
animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-
aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-
messages.min.js"></script>
<script
src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-
material.min.js"></script>
<script type="text/javascript">
angular.module('firstApplication', ['ngMaterial']);
Angular Material
ii
</script>
</head>
<body ng-app="firstApplication" ng-cloak>
<md-toolbar class="md-warn">
<div class="md-toolbar-tools">
<h2 class="md-flex">HTML 5</h2>
</div>
</md-toolbar>
<md-content flex layout-padding>
<p>HTML5 is the next major revision of the HTML standard superseding HTML
4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting
content on the World Wide Web.</p>
<p>HTML5 is a cooperation between the World Wide Web Consortium (W3C) and
the Web Hypertext Application Technology Working Group (WHATWG).</p>
<p>The new standard incorporates features like video playback and drag-and-
drop that have been previously dependent on third-party browser plug-ins such as
Adobe Flash, Microsoft Silverlight, and Google Gears.</p>
</md-content>
</body>
</html>
Copyright&Disclaimer
 Copyright 2017 by Tutorials Point (I) Pvt. Ltd.
All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt.
Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any
contents or a part of contents of this e-book in any manner without written consent of the
publisher.
We strive to update the contents of our website and tutorials as timely and as precisely as
possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd.
provides no guarantee regarding the accuracy, timeliness or completeness of our website or its
contents including this tutorial. If you discover any errors on our website or in this tutorial,
please notify us at contact@tutorialspoint.com
Angular Material
iii
TableofContents
About the Tutorial............................................................................................................................................. i
Audience ........................................................................................................................................................... i
Prerequisites ..................................................................................................................................................... i
Execute Angular Material Online....................................................................................................................... i
Copyright & Disclaimer..................................................................................................................................... ii
Table of Contents ............................................................................................................................................ iii
1. ANGULAR MATERIAL – OVERVIEW..............................................................................................1
2. ANGULAR MATERIAL – ENVIRONMENT SETUP.............................................................................2
How to Use Angular Material? ......................................................................................................................... 2
Local Installation .............................................................................................................................................. 2
CDN Based Version........................................................................................................................................... 4
3. ANGULAR MATERIAL – AUTOCOMPLETE......................................................................................6
Attributes......................................................................................................................................................... 6
4. ANGULAR MATERIAL – BOTTOM SHEET.....................................................................................13
5. ANGULAR MATERIAL – CARDS....................................................................................................17
6. ANGULAR MATERIAL – WIDGETS ...............................................................................................23
Angular Material – Buttons ............................................................................................................................ 26
Angular Material – CheckBoxes...................................................................................................................... 33
Angular Material – Content............................................................................................................................ 35
Angular Material – DatePicker........................................................................................................................ 37
Angular Material – Dialogs ............................................................................................................................. 41
Angular Material – Divider ............................................................................................................................. 45
Angular Material – List ................................................................................................................................... 48
Angular Material
iv
Angular Material – Menu ............................................................................................................................... 51
Angular Material - Menu Bar.......................................................................................................................... 54
Angular Material – Progress Bars ................................................................................................................... 57
Angular Material – Radio Buttons .................................................................................................................. 64
Angular Material – Selects.............................................................................................................................. 67
Angular Material – Fab Toolbars..................................................................................................................... 70
Angular Material – Sliders .............................................................................................................................. 73
Angular Material – Tabs ................................................................................................................................. 76
Angular Material – Toolbars........................................................................................................................... 80
Angular Material – Tooltips............................................................................................................................ 84
Angular Material – Chips ................................................................................................................................ 87
Angular Material – Contact Chips ................................................................................................................... 92
7. ANGULAR MATERIAL – LAYOUTS................................................................................................97
Layout Directive ............................................................................................................................................. 97
Flex Directive................................................................................................................................................ 100
8. ANGULAR MATERIAL – INPUTS ................................................................................................103
9. ANGULAR MATERIAL – ICONS..................................................................................................107
10. ANGULAR MATERIAL – GRIDS ..................................................................................................112
Attributes..................................................................................................................................................... 112
11. ANGULAR MATERIAL – SIDENAV..............................................................................................116
12. ANGULAR MATERIAL – FAB SPEED DIAL...................................................................................119
Attributes..................................................................................................................................................... 119
13. ANGULAR MATERIAL – SUBHEADERS.......................................................................................124
14. ANGULAR MATERIAL – SWIPE..................................................................................................127
Angular Material
v
15. ANGULAR MATERIAL – SWITCHES............................................................................................130
16. ANGULAR MATERIAL – THEME.................................................................................................135
17. ANGULAR MATERIAL – TOASTS................................................................................................139
18. ANGULAR MATERIAL – TYPOGRAPHY.......................................................................................141
19. ANGULAR MATERIAL – VIRTUAL REPEAT..................................................................................144
Attributes..................................................................................................................................................... 144
md-virtual-repeat......................................................................................................................................... 144
20. ANGULAR MATERIAL – WHITEFRAME......................................................................................150
Angular Material
6
Angular Material is a UI component library for Angular JS developers. Angular Material's
reusable UI components help in constructing attractive, consistent, and functional web pages
and web applications while adhering to modern web design principles like browser portability,
device independence, and graceful degradation.
Following are a few salient features of Angular Material:
 In-built responsive designing.
 Standard CSS with minimal footprint.
 Includes new versions of common user interface controls such as buttons, check boxes,
and text fields which are adapted to follow Material Design concepts.
 Includes enhanced and specialized features like cards, toolbar, speed dial, side nav,
swipe, and so on.
 Cross-browser, and can be used to create reusable web components.
Responsive Design
 Angular Material has in-built responsive designing so that the website created using
Angular Material will redesign itself as per the device size.
 Angular Material classes are created in such a way that the website can fit any screen
size.
 The websites created using Angular Material are fully compatible with PC, tablets, and
mobile devices.
Extensible
 Angular Material is by design very minimal and flat.
 It is designed considering the fact that it is much easier to add new CSS rules than to
overwrite existing CSS rules.
 It supports shadows and bold colors.
 The colors and shades remain uniform across various platforms and devices.
And most important of all, Angular Material is absolutely free to use.
1. ANGULAR MATERIAL – OVERVIEW
Angular Material
7
HowtoUseAngularMaterial?
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.
 CDN Based Version - You can include the angular-material.min.css and angular-
material js files into your HTML code directly from the Content Delivery Network (CDN).
LocalInstallation
Befor we use the following npm command, we require the NodeJS installation on our system.
To get information about node JS, click here and open the NodeJS command line interface.
We will use the following command to install Angular Material libraries.
npm install angular-material
The above command will generate the following output −
angular-animate@1.5.2 node_modulesangular-animate
angular-aria@1.5.2 node_modulesangular-aria
angular-messages@1.5.2 node_modulesangular-messages
angular@1.5.2 node_modulesangular
angular-material@1.0.6 node_modulesangular-material
npm will download the files under node_modules > angular-material folder. Include the
files as explained in the following example −
Example
Now you can include the css and js file in your HTML file as follows −
<html lang="en" >
2. ANGULAR MATERIAL – ENVIRONMENT SETUP
Angular Material
8
<head>
<link rel="stylesheet" href="/node_modules/angular-material/angular-
material.css">
<script src="/node_modules/angular-material/angular.js"></script>
<script src="/node_modules/angular-material/angular-animate.js"></script>
<script src="/node_modules/angular-material/angular-aria.js"></script>
<script src="/node_modules/angular-material/angular-messages.js"></script>
<script src="/node_modules/angular-material/angular-material.js"></script>
<script type="text/javascript">
angular.module('firstApplication', ['ngMaterial']);
</script>
</head>
<body ng-app="firstApplication" ng-cloak>
<md-toolbar class="md-warn">
<div class="md-toolbar-tools">
<h2 class="md-flex">HTML 5</h2>
</div>
</md-toolbar>
<md-content flex layout-padding>
<p>HTML5 is the next major revision of the HTML standard superseding HTML
4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting
content on the World Wide Web.</p>
<p>HTML5 is a cooperation between the World Wide Web Consortium (W3C) and
the Web Hypertext Application Technology Working Group (WHATWG).</p>
<p>The new standard incorporates features like video playback and drag-
and-drop that have been previously dependent on third-party browser plug-ins such
as Adobe Flash, Microsoft Silverlight, and Google Gears.</p>
</md-content>
</body>
</html>
The above program will generate the following result –
Angular Material
9
CDNBasedVersion
You can include the angular-material.css and angular-material.js files into your HTML
code directly from the Content Delivery Network (CDN). Google CDN provides content for the
latest version.
We are using the Google CDN version of the library throughout this tutorial.
Example
Now let us rewrite the above example using angular-material.min.css and angular-
material.min.js from Google CDN.
<html lang="en" >
<head>
<link rel="stylesheet"
href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-
material.min.css">
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></scrip
t>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-
animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-
aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-
messages.min.js"></script>
<script
src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-
material.min.js"></script>
<script type="text/javascript">
angular.module('firstApplication', ['ngMaterial']);
Angular Material
10
</script>
</head>
<body ng-app="firstApplication" ng-cloak>
<md-toolbar class="md-warn">
<div class="md-toolbar-tools">
<h2 class="md-flex">HTML 5</h2>
</div>
</md-toolbar>
<md-content flex layout-padding>
<p>HTML5 is the next major revision of the HTML standard superseding HTML
4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting
content on the World Wide Web.</p>
<p>HTML5 is a cooperation between the World Wide Web Consortium (W3C) and
the Web Hypertext Application Technology Working Group (WHATWG).</p>
<p>The new standard incorporates features like video playback and drag-
and-drop that have been previously dependent on third-party browser plug-ins such
as Adobe Flash, Microsoft Silverlight, and Google Gears.</p>
</md-content>
</body>
</html>
The above program will generate the following result –
Angular Material
11
The md-autocomplete, an Angular Directive, is used as a special input control with an inbuilt
dropdown 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. <md-autocomplete> can be
used to provide search results from local or remote data sources. md-autocomplete caches
results when performing a query. After first call, it uses the cached results to eliminate
unnecessary server requests or lookup logic and it can be disabled.
Attributes
The following table lists out the parameters and description of the different attributes of md-
autocomplete.
S.No. Parameter & Description
1
* md-items
An expression in the format of item in items to iterate over matches for your search.
2
md-selected-item-change
An expression to be run each time a new item is selected.
3
md-search-text-change
An expression to be run each time the search text updates.
4
md-search-text
A model to bind the search query text to.
5
md-selected-item
A model to bind the selected item to.
6
md-item-text
An expression that will convert your object to a single string.
7
placeholder
Placeholder text that will be forwarded to the input.
3. ANGULAR MATERIAL – AUTOCOMPLETE
Angular Material
12
S.No. Parameter & Description
8
md-no-cache
Disables the internal caching that happens in autocomplete.
9
ng-disabled
Determines whether or not to disable the input field.
10
md-min-length
Specifies the minimum length of text before autocomplete will make suggestions.
11
md-delay
Specifies the amount of time (in milliseconds) to wait before looking for results.
12
md-autofocus
If true, will immediately focus the input element.
13
md-autoselect
If true, the first item will be selected by default.
14
md-menu-class
This will be applied to the dropdown menu for styling.
15
md-floating-label
This will add a floating label to autocomplete and wrap it in the md-input-container.
16
md-input-name
The name attribute given to the input element to be used with the FormController.
17
md-input-id
An ID to be added to the input element.
18
md-input-minlength
The minimum length for the input's value for validation.
19 md-input-maxlength
Angular Material
13
S.No. Parameter & Description
The maximum length for the input's value for validation.
20
md-select-on-match
When set as true, autocomplete will automatically select the exact item if the search
text is an exact match.
Example
The following example shows the use of the md-autocomplete directive and also the use of
autocomplete.
am_autocomplete.htm
<html lang="en" >
<head>
<link rel="stylesheet"
href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-
material.min.css">
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></scrip
t>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-
animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-
aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-
messages.min.js"></script>
<script
src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-
material.min.js"></script>
<script language="javascript">
angular
.module('firstApplication', ['ngMaterial'])
.controller('autoCompleteController', autoCompleteController);
function autoCompleteController ($timeout, $q, $log) {
var self = this;
self.simulateQuery = false;
Angular Material
14
self.isDisabled = false;
// list of states to be displayed
self.states = loadStates();
self.querySearch = querySearch;
self.selectedItemChange = selectedItemChange;
self.searchTextChange = searchTextChange;
self.newState = newState;
function newState(state) {
alert("This functionality is yet to be implemented!");
}
function querySearch (query) {
var results = query ? self.states.filter( createFilterFor(query) ) :
self.states, deferred;
if (self.simulateQuery) {
deferred = $q.defer();
$timeout(function () {
deferred.resolve( results );
},
Math.random() * 1000, false);
return deferred.promise;
} else {
return results;
}
}
function searchTextChange(text) {
$log.info('Text changed to ' + text);
}
function selectedItemChange(item) {
$log.info('Item changed to ' + JSON.stringify(item));
}
//build list of states as map of key-value pairs
function loadStates() {
var allStates = 'Alabama, Alaska, Arizona, Arkansas, California,
Colorado, Connecticut, Delaware,
Angular Material
15
Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas,
Kentucky, Louisiana,
Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi,
Missouri, Montana,
Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New
York, North Carolina,
North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island,
South Carolina,
South Dakota, Tennessee, Texas, Utah, Vermont, Virginia,
Washington, West Virginia,
Wisconsin, Wyoming';
return allStates.split(/, +/g).map( function (state) {
return {
Angular Material
16
End of ebook preview
If you liked what you saw…
Buy it from our store @ https://store.tutorialspoint.com

More Related Content

What's hot (20)

Angular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariAngular Introduction By Surekha Gadkari
Angular Introduction By Surekha Gadkari
Surekha Gadkari
 
Angular 8
Angular 8 Angular 8
Angular 8
Sunil OS
 
Angular JS - Develop Responsive Single Page Application
Angular JS - Develop Responsive Single Page ApplicationAngular JS - Develop Responsive Single Page Application
Angular JS - Develop Responsive Single Page Application
Edureka!
 
AngularJS : Superheroic JavaScript MVW Framework
AngularJS : Superheroic JavaScript MVW FrameworkAngularJS : Superheroic JavaScript MVW Framework
AngularJS : Superheroic JavaScript MVW Framework
Edureka!
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorial
Rohit Gupta
 
Angular components
Angular componentsAngular components
Angular components
Sultan Ahmed
 
Angular routing
Angular routingAngular routing
Angular routing
Sultan Ahmed
 
Bridging the Gap: Single-Page Apps and AEM
Bridging the Gap: Single-Page Apps and AEMBridging the Gap: Single-Page Apps and AEM
Bridging the Gap: Single-Page Apps and AEM
rbl002
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
Amit Baghel
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
 
Dynamic components using SPA concepts in AEM
Dynamic components using SPA concepts in AEMDynamic components using SPA concepts in AEM
Dynamic components using SPA concepts in AEM
Bojana Popovska
 
Live Demo : Trending Angular JS Featues
Live Demo : Trending Angular JS FeatuesLive Demo : Trending Angular JS Featues
Live Demo : Trending Angular JS Featues
Edureka!
 
Animation And Testing In AngularJS
Animation And Testing In AngularJSAnimation And Testing In AngularJS
Animation And Testing In AngularJS
Edureka!
 
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Edureka!
 
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Edureka!
 
OCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSOCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJS
Jonathan Meiss
 
Ecommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project CodingEcommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project Coding
Hemant Sarthak
 
User Interface customization for AEM 6
User Interface customization for AEM 6User Interface customization for AEM 6
User Interface customization for AEM 6
Damien Antipa
 
Intro to AngularJS
Intro to AngularJSIntro to AngularJS
Intro to AngularJS
Aaronius
 
Angular 5 presentation for beginners
Angular 5 presentation for beginnersAngular 5 presentation for beginners
Angular 5 presentation for beginners
Imran Qasim
 
Angular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariAngular Introduction By Surekha Gadkari
Angular Introduction By Surekha Gadkari
Surekha Gadkari
 
Angular 8
Angular 8 Angular 8
Angular 8
Sunil OS
 
Angular JS - Develop Responsive Single Page Application
Angular JS - Develop Responsive Single Page ApplicationAngular JS - Develop Responsive Single Page Application
Angular JS - Develop Responsive Single Page Application
Edureka!
 
AngularJS : Superheroic JavaScript MVW Framework
AngularJS : Superheroic JavaScript MVW FrameworkAngularJS : Superheroic JavaScript MVW Framework
AngularJS : Superheroic JavaScript MVW Framework
Edureka!
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorial
Rohit Gupta
 
Angular components
Angular componentsAngular components
Angular components
Sultan Ahmed
 
Bridging the Gap: Single-Page Apps and AEM
Bridging the Gap: Single-Page Apps and AEMBridging the Gap: Single-Page Apps and AEM
Bridging the Gap: Single-Page Apps and AEM
rbl002
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
 
Dynamic components using SPA concepts in AEM
Dynamic components using SPA concepts in AEMDynamic components using SPA concepts in AEM
Dynamic components using SPA concepts in AEM
Bojana Popovska
 
Live Demo : Trending Angular JS Featues
Live Demo : Trending Angular JS FeatuesLive Demo : Trending Angular JS Featues
Live Demo : Trending Angular JS Featues
Edureka!
 
Animation And Testing In AngularJS
Animation And Testing In AngularJSAnimation And Testing In AngularJS
Animation And Testing In AngularJS
Edureka!
 
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Edureka!
 
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Edureka!
 
OCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSOCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJS
Jonathan Meiss
 
Ecommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project CodingEcommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project Coding
Hemant Sarthak
 
User Interface customization for AEM 6
User Interface customization for AEM 6User Interface customization for AEM 6
User Interface customization for AEM 6
Damien Antipa
 
Intro to AngularJS
Intro to AngularJSIntro to AngularJS
Intro to AngularJS
Aaronius
 
Angular 5 presentation for beginners
Angular 5 presentation for beginnersAngular 5 presentation for beginners
Angular 5 presentation for beginners
Imran Qasim
 

Similar to Angular material tutorial (20)

Nodejs tutorial
Nodejs tutorialNodejs tutorial
Nodejs tutorial
HarikaReddy115
 
Jquery tutorial
Jquery tutorialJquery tutorial
Jquery tutorial
HarikaReddy115
 
javascript_tutorial.pdf
javascript_tutorial.pdfjavascript_tutorial.pdf
javascript_tutorial.pdf
kaouthar20
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
HarikaReddy115
 
Workshop Report
Workshop ReportWorkshop Report
Workshop Report
lakshitha perera
 
Jqueryui tutorial
Jqueryui tutorialJqueryui tutorial
Jqueryui tutorial
HarikaReddy115
 
Agile testing tutorial
Agile testing tutorialAgile testing tutorial
Agile testing tutorial
HarikaReddy115
 
Adobe robohelp tutorial
Adobe robohelp tutorialAdobe robohelp tutorial
Adobe robohelp tutorial
HarikaReddy115
 
Seo tutorial
Seo tutorialSeo tutorial
Seo tutorial
larrypeter369
 
Learn SEO with SDM
Learn SEO with SDMLearn SEO with SDM
Learn SEO with SDM
simplypari18
 
D3js tutorial
D3js tutorialD3js tutorial
D3js tutorial
HarikaReddy115
 
Asp.net mvc tutorial
Asp.net mvc tutorialAsp.net mvc tutorial
Asp.net mvc tutorial
HarikaReddy115
 
Consul tutorial
Consul tutorialConsul tutorial
Consul tutorial
HarikaReddy115
 
Software quality management_tutorial
Software quality management_tutorialSoftware quality management_tutorial
Software quality management_tutorial
HarikaReddy115
 
Behavior driven development_tutorial
Behavior driven development_tutorialBehavior driven development_tutorial
Behavior driven development_tutorial
HarikaReddy115
 
hibernate_tutorial.pdf
hibernate_tutorial.pdfhibernate_tutorial.pdf
hibernate_tutorial.pdf
badrfathallah2
 
Hibernate tutorial
Hibernate tutorialHibernate tutorial
Hibernate tutorial
HarikaReddy115
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
Doeun KOCH
 
Cakephp tutorial
Cakephp tutorialCakephp tutorial
Cakephp tutorial
HarikaReddy115
 
css_tutorial PD: Generate, view, or edit PDFs in web apps.
css_tutorial PD: Generate, view, or edit PDFs in web apps.css_tutorial PD: Generate, view, or edit PDFs in web apps.
css_tutorial PD: Generate, view, or edit PDFs in web apps.
helloraja
 
javascript_tutorial.pdf
javascript_tutorial.pdfjavascript_tutorial.pdf
javascript_tutorial.pdf
kaouthar20
 
Agile testing tutorial
Agile testing tutorialAgile testing tutorial
Agile testing tutorial
HarikaReddy115
 
Adobe robohelp tutorial
Adobe robohelp tutorialAdobe robohelp tutorial
Adobe robohelp tutorial
HarikaReddy115
 
Learn SEO with SDM
Learn SEO with SDMLearn SEO with SDM
Learn SEO with SDM
simplypari18
 
Software quality management_tutorial
Software quality management_tutorialSoftware quality management_tutorial
Software quality management_tutorial
HarikaReddy115
 
Behavior driven development_tutorial
Behavior driven development_tutorialBehavior driven development_tutorial
Behavior driven development_tutorial
HarikaReddy115
 
hibernate_tutorial.pdf
hibernate_tutorial.pdfhibernate_tutorial.pdf
hibernate_tutorial.pdf
badrfathallah2
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
Doeun KOCH
 
css_tutorial PD: Generate, view, or edit PDFs in web apps.
css_tutorial PD: Generate, view, or edit PDFs in web apps.css_tutorial PD: Generate, view, or edit PDFs in web apps.
css_tutorial PD: Generate, view, or edit PDFs in web apps.
helloraja
 
Ad

More from HarikaReddy115 (20)

Dbms tutorial
Dbms tutorialDbms tutorial
Dbms tutorial
HarikaReddy115
 
Data structures algorithms_tutorial
Data structures algorithms_tutorialData structures algorithms_tutorial
Data structures algorithms_tutorial
HarikaReddy115
 
Wireless communication tutorial
Wireless communication tutorialWireless communication tutorial
Wireless communication tutorial
HarikaReddy115
 
Cryptography tutorial
Cryptography tutorialCryptography tutorial
Cryptography tutorial
HarikaReddy115
 
Cosmology tutorial
Cosmology tutorialCosmology tutorial
Cosmology tutorial
HarikaReddy115
 
Control systems tutorial
Control systems tutorialControl systems tutorial
Control systems tutorial
HarikaReddy115
 
Computer logical organization_tutorial
Computer logical organization_tutorialComputer logical organization_tutorial
Computer logical organization_tutorial
HarikaReddy115
 
Computer fundamentals tutorial
Computer fundamentals tutorialComputer fundamentals tutorial
Computer fundamentals tutorial
HarikaReddy115
 
Compiler design tutorial
Compiler design tutorialCompiler design tutorial
Compiler design tutorial
HarikaReddy115
 
Communication technologies tutorial
Communication technologies tutorialCommunication technologies tutorial
Communication technologies tutorial
HarikaReddy115
 
Biometrics tutorial
Biometrics tutorialBiometrics tutorial
Biometrics tutorial
HarikaReddy115
 
Basics of computers_tutorial
Basics of computers_tutorialBasics of computers_tutorial
Basics of computers_tutorial
HarikaReddy115
 
Basics of computer_science_tutorial
Basics of computer_science_tutorialBasics of computer_science_tutorial
Basics of computer_science_tutorial
HarikaReddy115
 
Basic electronics tutorial
Basic electronics tutorialBasic electronics tutorial
Basic electronics tutorial
HarikaReddy115
 
Auditing tutorial
Auditing tutorialAuditing tutorial
Auditing tutorial
HarikaReddy115
 
Artificial neural network_tutorial
Artificial neural network_tutorialArtificial neural network_tutorial
Artificial neural network_tutorial
HarikaReddy115
 
Artificial intelligence tutorial
Artificial intelligence tutorialArtificial intelligence tutorial
Artificial intelligence tutorial
HarikaReddy115
 
Antenna theory tutorial
Antenna theory tutorialAntenna theory tutorial
Antenna theory tutorial
HarikaReddy115
 
Analog communication tutorial
Analog communication tutorialAnalog communication tutorial
Analog communication tutorial
HarikaReddy115
 
Amplifiers tutorial
Amplifiers tutorialAmplifiers tutorial
Amplifiers tutorial
HarikaReddy115
 
Data structures algorithms_tutorial
Data structures algorithms_tutorialData structures algorithms_tutorial
Data structures algorithms_tutorial
HarikaReddy115
 
Wireless communication tutorial
Wireless communication tutorialWireless communication tutorial
Wireless communication tutorial
HarikaReddy115
 
Control systems tutorial
Control systems tutorialControl systems tutorial
Control systems tutorial
HarikaReddy115
 
Computer logical organization_tutorial
Computer logical organization_tutorialComputer logical organization_tutorial
Computer logical organization_tutorial
HarikaReddy115
 
Computer fundamentals tutorial
Computer fundamentals tutorialComputer fundamentals tutorial
Computer fundamentals tutorial
HarikaReddy115
 
Compiler design tutorial
Compiler design tutorialCompiler design tutorial
Compiler design tutorial
HarikaReddy115
 
Communication technologies tutorial
Communication technologies tutorialCommunication technologies tutorial
Communication technologies tutorial
HarikaReddy115
 
Basics of computers_tutorial
Basics of computers_tutorialBasics of computers_tutorial
Basics of computers_tutorial
HarikaReddy115
 
Basics of computer_science_tutorial
Basics of computer_science_tutorialBasics of computer_science_tutorial
Basics of computer_science_tutorial
HarikaReddy115
 
Basic electronics tutorial
Basic electronics tutorialBasic electronics tutorial
Basic electronics tutorial
HarikaReddy115
 
Artificial neural network_tutorial
Artificial neural network_tutorialArtificial neural network_tutorial
Artificial neural network_tutorial
HarikaReddy115
 
Artificial intelligence tutorial
Artificial intelligence tutorialArtificial intelligence tutorial
Artificial intelligence tutorial
HarikaReddy115
 
Antenna theory tutorial
Antenna theory tutorialAntenna theory tutorial
Antenna theory tutorial
HarikaReddy115
 
Analog communication tutorial
Analog communication tutorialAnalog communication tutorial
Analog communication tutorial
HarikaReddy115
 
Ad

Recently uploaded (20)

Dashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo SlidesDashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo Slides
Celine George
 
LDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-inLDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-in
LDM & Mia eStudios
 
POS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 SlidesPOS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 Slides
Celine George
 
Order Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptxOrder Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptx
Arshad Shaikh
 
Odoo 18 Point of Sale PWA - Odoo Slides
Odoo 18 Point of Sale PWA  - Odoo  SlidesOdoo 18 Point of Sale PWA  - Odoo  Slides
Odoo 18 Point of Sale PWA - Odoo Slides
Celine George
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910
PankajRodey1
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdfপ্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
Pragya - UEM Kolkata Quiz Club
 
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdfForestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
ChalaKelbessa
 
Introduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdfIntroduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdf
CME4Life
 
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATIONTHE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
PROF. PAUL ALLIEU KAMARA
 
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo SlidesHow to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
Celine George
 
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
wygalkelceqg
 
How to Configure Add to Cart in Odoo 18 Website
How to Configure Add to Cart in Odoo 18 WebsiteHow to Configure Add to Cart in Odoo 18 Website
How to Configure Add to Cart in Odoo 18 Website
Celine George
 
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
Arshad Shaikh
 
How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18
Celine George
 
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ..."Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
Arshad Shaikh
 
Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...
EduSkills OECD
 
State institute of educational technology
State institute of educational technologyState institute of educational technology
State institute of educational technology
vp5806484
 
Dashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo SlidesDashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo Slides
Celine George
 
LDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-inLDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-in
LDM & Mia eStudios
 
POS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 SlidesPOS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 Slides
Celine George
 
Order Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptxOrder Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptx
Arshad Shaikh
 
Odoo 18 Point of Sale PWA - Odoo Slides
Odoo 18 Point of Sale PWA  - Odoo  SlidesOdoo 18 Point of Sale PWA  - Odoo  Slides
Odoo 18 Point of Sale PWA - Odoo Slides
Celine George
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910K-Circle-Weekly-Quiz-May2025_12345678910
K-Circle-Weekly-Quiz-May2025_12345678910
PankajRodey1
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdfপ্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
Pragya - UEM Kolkata Quiz Club
 
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdfForestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
ChalaKelbessa
 
Introduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdfIntroduction to Online CME for Nurse Practitioners.pdf
Introduction to Online CME for Nurse Practitioners.pdf
CME4Life
 
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATIONTHE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
PROF. PAUL ALLIEU KAMARA
 
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo SlidesHow to Manage Orders in Odoo 18 Lunch - Odoo Slides
How to Manage Orders in Odoo 18 Lunch - Odoo Slides
Celine George
 
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
wygalkelceqg
 
How to Configure Add to Cart in Odoo 18 Website
How to Configure Add to Cart in Odoo 18 WebsiteHow to Configure Add to Cart in Odoo 18 Website
How to Configure Add to Cart in Odoo 18 Website
Celine George
 
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
Arshad Shaikh
 
How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18
Celine George
 
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ..."Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
Arshad Shaikh
 
Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...
EduSkills OECD
 
State institute of educational technology
State institute of educational technologyState institute of educational technology
State institute of educational technology
vp5806484
 

Angular material tutorial

  • 2. Angular Material i AbouttheTutorial Angular Material is a UI component library for Angular JS developers. Angular Material components help in constructing attractive, consistent, and functional web pages and web applications while adhering to modern web design principles like browser portability, device independence, and graceful degradation. It helps in creating faster, beautiful, and responsive websites. It is inspired by the Google Material Design. Audience This tutorial is meant for professionals who aspire to learn the basics of Angular Material and how to use it to create faster, beautiful, and responsive websites. This tutorial explains the fundamental concepts of Angular Material. Prerequisites Before proceeding with this tutorial, you should have a basic understanding of Angular JS, HTML, CSS, JavaScript, Document Object Model (DOM), and any text editor. In addition, it will help if you know how web-based applications work. ExecuteAngularMaterialOnline For most of the examples given in this tutorial, you will find a Try-it option. Use this option to execute your Angular Material programs then and there and enjoy your learning. Try the following example using the Try-it option available at the top right corner of the following sample code box – <html lang="en" > <head> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular- material.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular- animate.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular- aria.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular- messages.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular- material.min.js"></script> <script type="text/javascript"> angular.module('firstApplication', ['ngMaterial']);
  • 3. Angular Material ii </script> </head> <body ng-app="firstApplication" ng-cloak> <md-toolbar class="md-warn"> <div class="md-toolbar-tools"> <h2 class="md-flex">HTML 5</h2> </div> </md-toolbar> <md-content flex layout-padding> <p>HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting content on the World Wide Web.</p> <p>HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).</p> <p>The new standard incorporates features like video playback and drag-and- drop that have been previously dependent on third-party browser plug-ins such as Adobe Flash, Microsoft Silverlight, and Google Gears.</p> </md-content> </body> </html> Copyright&Disclaimer  Copyright 2017 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected]
  • 4. Angular Material iii TableofContents About the Tutorial............................................................................................................................................. i Audience ........................................................................................................................................................... i Prerequisites ..................................................................................................................................................... i Execute Angular Material Online....................................................................................................................... i Copyright & Disclaimer..................................................................................................................................... ii Table of Contents ............................................................................................................................................ iii 1. ANGULAR MATERIAL – OVERVIEW..............................................................................................1 2. ANGULAR MATERIAL – ENVIRONMENT SETUP.............................................................................2 How to Use Angular Material? ......................................................................................................................... 2 Local Installation .............................................................................................................................................. 2 CDN Based Version........................................................................................................................................... 4 3. ANGULAR MATERIAL – AUTOCOMPLETE......................................................................................6 Attributes......................................................................................................................................................... 6 4. ANGULAR MATERIAL – BOTTOM SHEET.....................................................................................13 5. ANGULAR MATERIAL – CARDS....................................................................................................17 6. ANGULAR MATERIAL – WIDGETS ...............................................................................................23 Angular Material – Buttons ............................................................................................................................ 26 Angular Material – CheckBoxes...................................................................................................................... 33 Angular Material – Content............................................................................................................................ 35 Angular Material – DatePicker........................................................................................................................ 37 Angular Material – Dialogs ............................................................................................................................. 41 Angular Material – Divider ............................................................................................................................. 45 Angular Material – List ................................................................................................................................... 48
  • 5. Angular Material iv Angular Material – Menu ............................................................................................................................... 51 Angular Material - Menu Bar.......................................................................................................................... 54 Angular Material – Progress Bars ................................................................................................................... 57 Angular Material – Radio Buttons .................................................................................................................. 64 Angular Material – Selects.............................................................................................................................. 67 Angular Material – Fab Toolbars..................................................................................................................... 70 Angular Material – Sliders .............................................................................................................................. 73 Angular Material – Tabs ................................................................................................................................. 76 Angular Material – Toolbars........................................................................................................................... 80 Angular Material – Tooltips............................................................................................................................ 84 Angular Material – Chips ................................................................................................................................ 87 Angular Material – Contact Chips ................................................................................................................... 92 7. ANGULAR MATERIAL – LAYOUTS................................................................................................97 Layout Directive ............................................................................................................................................. 97 Flex Directive................................................................................................................................................ 100 8. ANGULAR MATERIAL – INPUTS ................................................................................................103 9. ANGULAR MATERIAL – ICONS..................................................................................................107 10. ANGULAR MATERIAL – GRIDS ..................................................................................................112 Attributes..................................................................................................................................................... 112 11. ANGULAR MATERIAL – SIDENAV..............................................................................................116 12. ANGULAR MATERIAL – FAB SPEED DIAL...................................................................................119 Attributes..................................................................................................................................................... 119 13. ANGULAR MATERIAL – SUBHEADERS.......................................................................................124 14. ANGULAR MATERIAL – SWIPE..................................................................................................127
  • 6. Angular Material v 15. ANGULAR MATERIAL – SWITCHES............................................................................................130 16. ANGULAR MATERIAL – THEME.................................................................................................135 17. ANGULAR MATERIAL – TOASTS................................................................................................139 18. ANGULAR MATERIAL – TYPOGRAPHY.......................................................................................141 19. ANGULAR MATERIAL – VIRTUAL REPEAT..................................................................................144 Attributes..................................................................................................................................................... 144 md-virtual-repeat......................................................................................................................................... 144 20. ANGULAR MATERIAL – WHITEFRAME......................................................................................150
  • 7. Angular Material 6 Angular Material is a UI component library for Angular JS developers. Angular Material's reusable UI components help in constructing attractive, consistent, and functional web pages and web applications while adhering to modern web design principles like browser portability, device independence, and graceful degradation. Following are a few salient features of Angular Material:  In-built responsive designing.  Standard CSS with minimal footprint.  Includes new versions of common user interface controls such as buttons, check boxes, and text fields which are adapted to follow Material Design concepts.  Includes enhanced and specialized features like cards, toolbar, speed dial, side nav, swipe, and so on.  Cross-browser, and can be used to create reusable web components. Responsive Design  Angular Material has in-built responsive designing so that the website created using Angular Material will redesign itself as per the device size.  Angular Material classes are created in such a way that the website can fit any screen size.  The websites created using Angular Material are fully compatible with PC, tablets, and mobile devices. Extensible  Angular Material is by design very minimal and flat.  It is designed considering the fact that it is much easier to add new CSS rules than to overwrite existing CSS rules.  It supports shadows and bold colors.  The colors and shades remain uniform across various platforms and devices. And most important of all, Angular Material is absolutely free to use. 1. ANGULAR MATERIAL – OVERVIEW
  • 8. Angular Material 7 HowtoUseAngularMaterial? 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.  CDN Based Version - You can include the angular-material.min.css and angular- material js files into your HTML code directly from the Content Delivery Network (CDN). LocalInstallation Befor we use the following npm command, we require the NodeJS installation on our system. To get information about node JS, click here and open the NodeJS command line interface. We will use the following command to install Angular Material libraries. npm install angular-material The above command will generate the following output − [email protected] node_modulesangular-animate [email protected] node_modulesangular-aria [email protected] node_modulesangular-messages [email protected] node_modulesangular [email protected] node_modulesangular-material npm will download the files under node_modules > angular-material folder. Include the files as explained in the following example − Example Now you can include the css and js file in your HTML file as follows − <html lang="en" > 2. ANGULAR MATERIAL – ENVIRONMENT SETUP
  • 9. Angular Material 8 <head> <link rel="stylesheet" href="/node_modules/angular-material/angular- material.css"> <script src="/node_modules/angular-material/angular.js"></script> <script src="/node_modules/angular-material/angular-animate.js"></script> <script src="/node_modules/angular-material/angular-aria.js"></script> <script src="/node_modules/angular-material/angular-messages.js"></script> <script src="/node_modules/angular-material/angular-material.js"></script> <script type="text/javascript"> angular.module('firstApplication', ['ngMaterial']); </script> </head> <body ng-app="firstApplication" ng-cloak> <md-toolbar class="md-warn"> <div class="md-toolbar-tools"> <h2 class="md-flex">HTML 5</h2> </div> </md-toolbar> <md-content flex layout-padding> <p>HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting content on the World Wide Web.</p> <p>HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).</p> <p>The new standard incorporates features like video playback and drag- and-drop that have been previously dependent on third-party browser plug-ins such as Adobe Flash, Microsoft Silverlight, and Google Gears.</p> </md-content> </body> </html> The above program will generate the following result –
  • 10. Angular Material 9 CDNBasedVersion You can include the angular-material.css and angular-material.js files into your HTML code directly from the Content Delivery Network (CDN). Google CDN provides content for the latest version. We are using the Google CDN version of the library throughout this tutorial. Example Now let us rewrite the above example using angular-material.min.css and angular- material.min.js from Google CDN. <html lang="en" > <head> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular- material.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></scrip t> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular- animate.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular- aria.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular- messages.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular- material.min.js"></script> <script type="text/javascript"> angular.module('firstApplication', ['ngMaterial']);
  • 11. Angular Material 10 </script> </head> <body ng-app="firstApplication" ng-cloak> <md-toolbar class="md-warn"> <div class="md-toolbar-tools"> <h2 class="md-flex">HTML 5</h2> </div> </md-toolbar> <md-content flex layout-padding> <p>HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting content on the World Wide Web.</p> <p>HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).</p> <p>The new standard incorporates features like video playback and drag- and-drop that have been previously dependent on third-party browser plug-ins such as Adobe Flash, Microsoft Silverlight, and Google Gears.</p> </md-content> </body> </html> The above program will generate the following result –
  • 12. Angular Material 11 The md-autocomplete, an Angular Directive, is used as a special input control with an inbuilt dropdown 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. <md-autocomplete> can be used to provide search results from local or remote data sources. md-autocomplete caches results when performing a query. After first call, it uses the cached results to eliminate unnecessary server requests or lookup logic and it can be disabled. Attributes The following table lists out the parameters and description of the different attributes of md- autocomplete. S.No. Parameter & Description 1 * md-items An expression in the format of item in items to iterate over matches for your search. 2 md-selected-item-change An expression to be run each time a new item is selected. 3 md-search-text-change An expression to be run each time the search text updates. 4 md-search-text A model to bind the search query text to. 5 md-selected-item A model to bind the selected item to. 6 md-item-text An expression that will convert your object to a single string. 7 placeholder Placeholder text that will be forwarded to the input. 3. ANGULAR MATERIAL – AUTOCOMPLETE
  • 13. Angular Material 12 S.No. Parameter & Description 8 md-no-cache Disables the internal caching that happens in autocomplete. 9 ng-disabled Determines whether or not to disable the input field. 10 md-min-length Specifies the minimum length of text before autocomplete will make suggestions. 11 md-delay Specifies the amount of time (in milliseconds) to wait before looking for results. 12 md-autofocus If true, will immediately focus the input element. 13 md-autoselect If true, the first item will be selected by default. 14 md-menu-class This will be applied to the dropdown menu for styling. 15 md-floating-label This will add a floating label to autocomplete and wrap it in the md-input-container. 16 md-input-name The name attribute given to the input element to be used with the FormController. 17 md-input-id An ID to be added to the input element. 18 md-input-minlength The minimum length for the input's value for validation. 19 md-input-maxlength
  • 14. Angular Material 13 S.No. Parameter & Description The maximum length for the input's value for validation. 20 md-select-on-match When set as true, autocomplete will automatically select the exact item if the search text is an exact match. Example The following example shows the use of the md-autocomplete directive and also the use of autocomplete. am_autocomplete.htm <html lang="en" > <head> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular- material.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></scrip t> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular- animate.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular- aria.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular- messages.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular- material.min.js"></script> <script language="javascript"> angular .module('firstApplication', ['ngMaterial']) .controller('autoCompleteController', autoCompleteController); function autoCompleteController ($timeout, $q, $log) { var self = this; self.simulateQuery = false;
  • 15. Angular Material 14 self.isDisabled = false; // list of states to be displayed self.states = loadStates(); self.querySearch = querySearch; self.selectedItemChange = selectedItemChange; self.searchTextChange = searchTextChange; self.newState = newState; function newState(state) { alert("This functionality is yet to be implemented!"); } function querySearch (query) { var results = query ? self.states.filter( createFilterFor(query) ) : self.states, deferred; if (self.simulateQuery) { deferred = $q.defer(); $timeout(function () { deferred.resolve( results ); }, Math.random() * 1000, false); return deferred.promise; } else { return results; } } function searchTextChange(text) { $log.info('Text changed to ' + text); } function selectedItemChange(item) { $log.info('Item changed to ' + JSON.stringify(item)); } //build list of states as map of key-value pairs function loadStates() { var allStates = 'Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware,
  • 16. Angular Material 15 Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming'; return allStates.split(/, +/g).map( function (state) { return {
  • 17. Angular Material 16 End of ebook preview If you liked what you saw… Buy it from our store @ https://store.tutorialspoint.com