Javascript 51
PolymerJS Auto Binding Example
PolymerJS provides an enhanced version of Template element with auto binding. In this demo,”We will check an use of auto binding for a template element”. Below code shows an example of IS attribute with auto-binding value.Normally template elements are not visible built by using auto binding, on page load the template HTML content is makes […]
ReactJS Initial State Example
getInitialState() is life cycle method of a ReactJS component. The state can be updated using setState() method.This method takes an JavaScript object. In this demo, “We will learn how to create a initial state object and how to change the value of the state”. Below code contains a react component having two buttons and a […]
Developing and Styling Shadow DOM Elements
:host and ::shadow pseudo selector can be used to style the HTML element inside shadow root. A shadow root can be created using createShadowRoot() method. In this demo, “We will create a custom element and style the HTML present inside shadow DOM”. A custom element can be referred in 2 ways.Inside its template it […]
AngularJS copy() and extend() Method Example
AngularJS provides copy() and extend() method for object manipulation. angular.copy(source,destination) method supports deep copy where destination object elements are deleted and source elements are copied to destination. angular.extend(destination,source) method does not support deep copy.Only enumerable object properties are copied from source to destination. In this demo, “We have created 2 sets of array and […]