Posts

Showing posts from 2020

Visual Studio Code Extensions for UI development

Visual Studio Code is the best IDE for any front end development. During the code development we do lots of things other than coding. Things like formatting, making builds and much more. To help the developers speed up there are lots of extensions available for Visual Studio Code. I have listed down extensions which I believe will definitely help during front end development: Beautify It is a very nice extension for formatting HTML and CSS. You not don't need to worry about the indentation, alignment of HTML and CSS files. Just select the piece of code you want to format, right click and use "Format Selection" option. It will format the code for you. JSHint Good for any JavaScript development. It provides following features: - Highlight errors based on JavaScript rules - Highlights if any code is not following best practice. It helps to avoid the bugs which can come in future due to bad code practice. - Highlights unnecessary variable declarations. Highlights ...

Application Loading Sequence with Angular CLI

When we create an angular application with Angular-CLI, it creates a skeleton project with many folders and files. In this blog,  we will be only focusing on the application loading sequence i.e. which files get loaded first and which follows it and so on. When we run ng serve command, files are loaded in following sequence: index.html It is the main HTML page. Angular CLI automatically adds all JavaScript and CSS files when building your app main.ts The main entry point for your application. Compiles the application with the JIT compiler and Bootstraps the application's root module (AppModule) to run in the browser. app/app.module.ts Defines the root module, named AppModule, that tells Angular how to assemble the application. Initially declares only the AppComponent. As you add more components to the app, they must be declared here. ...

Stack implementation using VanillaJS

Stack is a very popular data structure. It is present as library classes/interfaces in many object oriented language like Java, C#. In JavaScript there is no stack data structure by default but we can create one. I have written following code which can be used to utilize Stack features in JavaScript development. import UVModal from './UVModal'; var Stack = function(){   var items = [];   /**    * @description Pushes an item onto the top of this stack.    * @param {any} item - the item to be pushed onto this stack.    */   function push(item) {     items.push(item);   }   /**    * @description Removes the object at the top of this stack and returns that object    * @return {any} - The object at the top of this stack    */   function pop() {     return items.pop();...