Javascript 51
Object create and defineProperties Method
New ECMAScript 5.1 has new methods create() and defineProperties() method. Using create() method you can create new object. Using defineProperties() method can be used to create new properties for the given object. In this Demo, “We will create new object using create() method and add new property using defineProperties() method“. Below code uses the […]
AngularJS Factory Object Development
AngularJS provides factory() method to create factory object that can be reused across application. A factory object can be injected to any module in AngularJS application. In this Demo, "We will create factory object called with some method and inject this object to a controller". Below code uses factory() method to create StringUtil object.It has […]
AngularJS Require Attribute Directive Development
AngularJS provides $directive() method to create custom directive. directive() method takes no of initialization argument to build the directive component. There is one important attribute names 'require' through which a directive can call the API method if any exist in the parent directive. In this Demo,"We will create 2 directive.In one of the directive a […]
AngularJS Custom Filter
AngularJS provides $filter() method to creates custom filter. Filter can be used to the AngularJS expression.It is used as {{expression | filterName}}. In this demo,"We will create custom filter which will detect any vowel character if present inside a word". Below code shows a custom filter declaration and use inside a AngularJS expression.If a vowel […]