JavaScript

Creating Component in Angular 2

Posted on Updated on

Angular 2 being one of the most advanced front-end framework is lead in UI application development framework. Angular 2 is component driven framework, we are supposed to create components to develop the application. In our previous article¬†Angular 2 Hello world example, we discussed how to create Angular 2 application using angular CLI. Here in this article, we will be discussing about steps to create a component in Angular 2 application. Read the rest of this entry »

How to handle Global Variable scope issue in JavaScript

Posted on Updated on

One of the major problem with JavaScript is the leakage of scope and which leads to various issues as such variable name conflict. One of the best practice of JavaScript is to use to one global object variable and dynamically add variables to it or defines the variable as object property. This will restrict the variable scope and will help limit scope leakage. This way variables are restricted to one Global Variable scope.
Read the rest of this entry »