Posts

Day 13 : Angular directories

Image
In previous blog we learn the installation of angular cli... Now we are going to learn the configuration files or folder structure in angular...             We develop application or project in angular workspace. Workspace contains files for multiple projects or we can say that it allows us to organize our big applications into small and multiple projects.             When we run  > ng new project_name   command , the angular cli install all necessary angular npm packages and dependencies in a root folder project_name with new workspace.  By default, ng new creates a simple web application that is ready to run and can be easily modified.  Workspace configuration files : The workspace contains the workspace configuration file where the configuration files act as a root level application and subfolders act as a root level application source and test files.      1) e2e :      ...

Day 12 : Installation of Angular

Image
 Now we are going to see the installation of angular......             Angular is a front-end framework which is used to create a web applications. Angular has TypeScript by default or it supports TypeScript for creating functions in class.             The TypeScript not knows the browser so we need webpack . Webpack is used to compile TypeScript files into the JavaScript files. So that we can run the JavaScript file on browser. Now you know what is Webpack??           Webpack is an open source JavaScript module. Its purpose is to take all our code from application and makes it usable in browser. Angular uses webpack behind the screen. Angular CLI :                     Angular CLI is a command line interface tool that we use to initialize, develop, maintain angular applications. Angular CLI is used t...

Day 11 : Angular

Image
  Now we are going to learn the angular starting with basic introduction : Angular :- Angular or AngularJS is an very popular and widely used client-side framework. Angular was developed in 2011 by google corporation. It was built with "MVC" (Model-View-Controller) concept and the authors often call it as MVW(Model-View-Whatever) or MV*. The framework is firstly written in pure JavaScript, now it is in TypeScript. The framework introduces many powerful features to developer so that developer can create a single page, rich application easily. Specially it introduces the intersting concept of data-binding in which the automatic updations are done on view whenever the data(model) changes occur. Angular 2 :- Angular 2 was developed in 2016. Angular 2 was very popular because its supports the web, mobile and native desktops whereas Angular not supports the mobile. * The Angular 4 is developed in 2016 and Angular 5 is developed in 2017 * Why Angular??? Angular not only provides us ...

Day 10 : TypeScript

Image
         In this blog we are going to understand the abstract and interface. Abstract class : Semantically an abstract class is a half defined parent class. An abstract class is mainly used for inheritance where other classes derive from them. Abstract class is defined using "abstract" keyword. We cannot create instance of an abstract class. The classes which extends the abstract class must define all the abstract methods. The abstract classes not contain the function or method body. Example : Generalization : Generalization is a another word for parent class. Generalization is the process of extracting shared characteristics from two or more classes and combining them into a class or superclass. Specialization : Specialization is a another word for child class. Specialization is the process of creating new subclasses from old one. The child class also named as concrete class. Interface : An interface is an abstract type but not contain any code like a class. An...

Day 9 : TypeScript

Image
  Constructor : Constructor is a special type of  method or function which is called at the time of object creation. The constructor method is always defined with "constructor" keyword. The class always having a constructor is not needed or necessary. The members of the class in a constructor are accessed using "this" keyword. Syntax : constructor () { //statements                                                               } Example :      Access Modifiers : The access modifiers are used for controlling the visibility or availability of its data members. Mainly their are three types of access modifiers : 1) Public : By default, all members or functions of class are public. Public members are accessible anywhere in the program. 2) Private : The private members are accessible only within the class and its chi...

Day 8 : TypeScript

Image
Basic Concepts in TypeScript: Variable declaration : The default or traditional declaration of variable is : var a : number = 10; The let and const are two new concepts in variable declaration. The let keyword is some what same as var keyword. The let keyword allows user to avoid some of "gotchas" that we use in JS. Now, you all wondering what is "gotchas"??                 Gotchas are nothing but some what errors which we can avoid for better output. Consider a loop as an example : //var keyword gives access to i outside loop. //code:                 for(var i=0;i<5;i++) {                    console.log(i);               }               console.log(i); //output: 0 1 2 3 4 5 //let keyword not gives access to i outside loop. //code :         ...

Day 7 : TypeScript

Image
  TypeScript : Basic Introduction : TypeScript is an open-source, object-oriented programming language. TypeScript is developed and maintained by “Microsoft” and introduced by “Anders Hejlsberg” . TypeScript is a strongly typed superset of JavaScript. TypeScript is the ES6 version of JavaScript with some additional features. TypeScript cannot be directly run on the browser. TypeScript is a language as well as a set of tools. Features : TypeScript extends JavaScript and makes it strongly typed.                        - Strongly typed means when we write the code the datatype is checked. During the development phase errors and issues are caught. All JavaScript code are valid TypeScript code. TypeScript gives us benefit of OOP features, classes, closures and IIFE.  Why we use TypeScript instead of JavaScript?? Firstly JavaScript language is introduced for client-side. After that the Node.js makes JavaScript server-side t...