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.

Angular Material - Quick Guide

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 - Useful Resources

If you want to list down your website, book or any other resource on this page then please contact at webmaster@tutorialspoint.com

Angular Material - Discussion

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.

What is AJAX?

  • AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS, and Java Script.
  • Ajax uses XHTML for content, CSS for presentation, along with Document Object Model and JavaScript for dynamic content display.

AJAX - Technologies

AJAX cannot work independently. It is used in combination with other technologies to create interactive webpages.

JavaScript

  • Loosely typed scripting language.
  • JavaScript function is called when an event occurs in a page.
  • Glue for the whole AJAX operation.

AJAX - Examples

Here is a list of some famous web applications that make use of AJAX.

Google Maps

A user can drag an entire map by using the mouse, rather than clicking on a button.

AJAX - Browser Support

All the available browsers cannot support AJAX. Here is a list of major browsers, that support AJAX.
  • Mozilla Firefox 1.0 and above.
  • Netscape version 7.1 and above.
  • Apple Safari 1.2 and above.

AJAX - Action

This chapter gives you a clear picture of the exact steps of AJAX operation.

Steps of AJAX Operation

  • A client event occurs.
  • An XMLHttpRequest object is created.
  • The XMLHttpRequest object is configured.

AJAX - XMLHttpRequest

The XMLHttpRequest object is the key to AJAX. It has been available ever since Internet Explorer 5.5 was released in July 2000, but was not fully discovered until AJAX and Web 2.0 in 2005 became popular.

AJAX - Database Operations

To clearly illustrate how easy it is to access information from a database using AJAX, we are going to build MySQL queries on the fly and display the results on "ajax.html". But before we proceed, let us do the ground work. Create a table using the following command.

AJAX - Security

AJAX Security: Server Side

  • AJAX-based Web applications use the same server-side security schemes of regular Web applications.

AJAX - Issues

AJAX is growing very fast and that is the reason that it contains many issues with it. We hope with the passes of time, they will be resolved and AJAX will become ideal for web applications. We are listing down a few issues that AJAX currently suffers from.

AJAX - Quick Guide

What is AJAX?

  • AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS, and Java Script.

AJAX - Useful Resources

The following resources contain additional information on AJAX. Please use them to get more in-depth knowledge on this topic.

Discuss AJAX

AJAX, is a web development technique for creating interactive web applications.
If you know JavaScript, HTML, CSS, and XML, then you need to spend just one hour to start with AJAX.

VBA - Overview

VBA stands for Visual Basic for Applications an event-driven programming language from Microsoft that is now predominantly used with Microsoft office applications such as MSExcel, MS-Word, and MS-Access.
It helps techies to build customized applications and solutions to enhance the capabilities of those applications.

VBA - Excel Macros

In this chapter, you will learn how to write a simple macro in a step by step manner.
Step 1 − First, enable 'Developer' menu in Excel 20XX. To do the same, click File → Options.
Step 2 − Click ‘Customize the Ribbon’ tab and check 'Developer'. Click 'OK'.

VBA - Excel Terms

In this chapter, you will acquaint yourself with the commonly used excel VBA terminologies. These terminologies will be used in further modules, hence understanding each one of these is important.

VBA - Macro Comments

Comments are used to document the program logic and the user information with which other programmers can seamlessly work on the same code in future.

VBA - Message Box

The MsgBox function displays a message box and waits for the user to click a button and then an action is performed based on the button clicked by the user.

VBA - InputBox

The InputBox function prompts the users to enter values. After entering the values, if the user clicks the OK button or presses ENTER on the keyboard, the InputBox function will return the text in the text box. If the user clicks the Cancel button, the function will return an empty string ("").

VBA - Variables

Variable is a named memory location used to hold a value that can be changed during the script execution. Following are the basic rules for naming a variable.

VBA - Constants

Constant is a named memory location used to hold a value that CANNOT be changed during the script execution. If a user tries to change a Constant value, the script execution ends up with an error. Constants are declared the same way the variables are declared.

VBA - Operators

An Operator can be defined using a simple expression - 4 + 5 is equal to 9. Here, 4 and 5 are called operands and + is called operator. VBA supports following types of operators −

VBA - Decisions

Decision making allows the programmers to control the execution flow of a script or one of its sections. The execution is governed by one or more conditional statements.
Following is the general form of a typical decision making structure found in most of the programming languages.

VBA - Loops

There may be a situation when you need to execute a block of code several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on.

VBA - Strings

Strings are a sequence of characters, which can consist of either alphabets, numbers, special characters, or all of them. A variable is said to be a string if it is enclosed within double quotes " ".

VBA - Date-Time Function

VBScript Date and Time Functions help the developers to convert date and time from one format to another or to express the date or time value in the format that suits a specific condition.

VBA - Arrays

We know very well that a variable is a container to store a value. Sometimes, developers are in a position to hold more than one value in a single variable at a time. When a series of values are stored in a single variable, then it is known as an array variable.

VBA - User Defined Functions

A function is a group of reusable code which can be called anywhere in your program. This eliminates the need of writing the same code over and over again. This enables the programmers to divide a big program into a number of small and manageable functions.

VBA - Sub Procedure

Sub Procedures are similar to functions, however there are a few differences.
  • Sub procedures DO NOT Return a value while functions may or may not return a value.
  • Sub procedures CAN be called without a call keyword.
  • Sub procedures are always enclosed within Sub and End Sub statements.

VBA - Events

VBA, an event-driven programming can be triggered when you change a cell or range of cell values manually. Change event may make things easier, but you can very quickly end a page full of formatting. There are two kinds of events.

VBA - Error Handling

There are three types of errors in programming: (a) Syntax Errors, (b) Runtime Errors, and (c) Logical Errors.

Syntax errors

Syntax errors, also called as parsing errors, occur at the interpretation time for VBScript. For example, the following line causes a syntax error because it is missing a closing parenthesis.

VBA - Excel Objects

When programming using VBA, there are few important objects that a user would be dealing with.
  • Application Objects
  • Workbook Objects
  • Worksheet Objects
  • Range Objects

VBA - Text Files

You can also read Excel File and write the contents of the cell into a Text File using VBA. VBA allows the users to work with text files using two methods −
  • File System Object
  • using Write Command

VBA - Programming Charts

Using VBA, you can generate charts based on certain criteria. Let us take a look at it using an example.
Step 1 − Enter the data against which the graph has to be generated.

VBA - User Forms

A User Form is a custom-built dialog box that makes a user data entry more controllable and easier to use for the user. In this chapter, you will learn to design a simple form and add data into excel.

VBA - Quick Guide

VBA stands for Visual Basic for Applications an event-driven programming language from Microsoft that is now predominantly used with Microsoft office applications such as MSExcel, MS-Word, and MS-Access.
It helps techies to build customized applications and solutions to enhance the capabilities of those applications.

VBA - Useful Resources

The following resources contain additional information on VBA. Please use them to get more in-depth knowledge on this topic.

Discuss VBA

VBA stands for Visual Basic for Applications, an event-driven programming language from Microsoft. It is now predominantly used with Microsoft Office applications such as MSExcel, MS-Word and MS-Access. This tutorial teaches the basics of VBA. Each of the sections contain related topics with simple and useful examples.