Month: May 2016

HTML5 New Elements


HTML5 offers new elements for better document structure:

Tag Description
<article> Defines an article in the document
<aside> Defines content aside from the page content
<bdi> Defines a part of text that might be formatted in a different direction
from other text
<details> Defines additional details that the user can view or hide
<dialog> Defines a dialog box or window
<figcaption> Defines a caption for a <figure> element
<figure> Defines self-contained content, like illustrations, diagrams, photos, code
listings, etc.
<footer> Defines a footer for the document or a section
<header> Defines a header for the document or a section
<main> Defines the main content of a document
<mark> Defines marked or highlighted text
<menuitem> Defines a command/menu item that the user can invoke from a popup menu
<meter> Defines a scalar measurement within a known range (a gauge)
<nav> Defines navigation links in the document
<progress> Defines the progress of a task
<rp> Defines what to show in browsers that do not support ruby annotations
<rt> Defines an explanation/pronunciation of characters (for East Asian
typography)
<ruby> Defines a ruby annotation (for East Asian typography)
<section> Defines a section in the document
<summary> Defines a visible heading for a <details> element
<time> Defines a date/time
<wbr> Defines a possible line-break
Advertisements

ABCs of WCF


WCFABC

ABC is the three building blocks of WCF and they are known as

A – Address (Where) : Address tells us where to find the services, like url

B – Bindings (How) : Bindings tells us how to find the services or using which protocols finds the services (SOAP, HTTP, TCP etc.) . Read more about Different Types Of Binding In WCF

.C – Contacts (What) : Contracts are an agreement between the consumer and the service providers that explains what parameters the service expects and what return values it gives.

AngularJS Built in Directives


indexA directive in AngularJS is a meaningful name for a function that is attached with DOM elements. All AngularJS built in directives prefixed with the ng namespace. It is used to extend HTML elemets attribute. AngularJS directives have the ability to execute methods, define behavior, attach controllers and scope objects, manipulate the DOM, and more.

Built in Directives

Here is a list of AngularJS built in directives with description.

Directives Description
ng-app It is added to set the AngularJS section.
ng-init It sets default variable value.
ng-bind It is an alternative to {{ }} template.
ng-bind-template It binds multiple expressions to the view.
ng-non-bindable It used to not to bind data.
ng-bind-html It used to bind inner HTML property of an HTML element.
ng-change It evaluates specified expression when the user changes the input.
ng-checked It is used to set checkbox checked.
ng-class It is used to the css class dynamically.
ng-cloak It is usedv to prevent displaying the content until AngularJS has taken control.
ng-click It is used to execute a method or expression when element is clicked.
ng-controller It is used to attach a controller class to the view.
ng-disabled It is used to attach disabled attributes to the form element.
ng-form It is used to set form within a form.
ng-href It is used to dynamically bind AngularJS variables to the href attribute.
ng-include It is used to fetch, compile and include an external HTML fragment to your page.
ng-if It is used to remove or recreate an element in the DOM depending on an expression
ng-switch It is used to conditionally switch control based on matching expression.
ng-model It is used to bind an input,select, textarea etc elements with model property.
ng-readonly It is used to set readonly attribute to an element.
ng-repeat It is used to loop through each item in collection to create a new template.
ng-selected It is used to set selected option in <select> element.
ng-show/ng-hide It workes based on expression, if true then the element is shown or hidden respectively.
ng-src It is used to dynamically bind AngularJS variables to the src attribute.
ng-submit It is used to bind angular expressions to onsubmit events.
ng-value It is used to bind angular expressions to the value of <option>.
ng-required It is used to bind angular expressions to onsubmit events.
ng-style It is used to set CSS style on an HTML element conditionally.
ng-pattern It is used to add the pattern validator to ngModel.
ng-maxlength It is used to adds the maxlength validator to ngModel.
ng-minlength It is used to adds the minlength validator to ngModel.
ng-classeven It works in conjunction with ngRepeat and take effect only on odd (even) rows.
ng-classodd It works in conjunction with ngRepeat and take effect only on odd (even) rows.
ng-cut It is used to specify custom behavior on cut event.
ng-copy It is used to specify custom behavior on copy event.
ng-paste It is used to specify custom behavior on paste event.
ng-options It is used to dynamically generate a list of <option> elements for the <select> element.
ng-list It is used to convert string into list based on specified delimiter.
ng-open It is used to set the open attribute on the element, if the expression inside ngOpen is truthy.