Skip to main content

Posts

Showing posts from August, 2018

What are the differences between Angular Js, Angular 2 and Angular 4?

 Angular Js was introduced in 2010 as a javascript framework for building client applications So it came into popularity. And angular team started adding new features to the core. But the framework is designed with needs up to date applications in might plus it was overly complex. So, the Angular team decided to write the original framework using typescript. As a result, Angular 2 came out in may 2016.     This new version entirely different from angular 1. This made a lot of developers unhappy 😕.  Because numerous applications built with Angular 1. Each application over a few thousand lines of code has to be written. So Angular Team took typescript. Now, this is a much better framework and it is easier & very clear to understand to work with.  After a few minor upgrades in Angular 2 such as 2.1, 2.2, and 2.3, a sudden update came into existence i.e Angular 4.Again all developers got confused 😞 including me. Then what happened to Angular 3 😨....

AngularJS - Directives

First, we have to learn AngularJs directives, Directives are simple special attributes in HTML. It has own set of built-in directives which offers functionality to your applications. To check all directive list https://docs.angularjs.org/api/ng/directive  For example, I take ng-app , ng-model ,  ng-init and ng-bind .  First will talk about the ng-app directive, the ng-app directive is initializing the AngularJS application. To take the values of all HTML inputs ( input, radio, select and textarea ) we use the ng-model.     ng-bind is print the expression. we can also be written inside double braces: {{ expression }} . AngularJS - Directives Example 1  Note: All these directives are work in inside the ng-app closed tag. you can assign ng-app directive to any tag. like <HTML>, <DIV>, <SPAN> but make sure initialize the main parent tag.     Now, We can check data initializes before page load. For this, ...

What is AngularJS?

AngularJs is nothing but an MVC style javascript framework for creating single page apps. It is a javascript framework or we can say  "A framework will build client applications in HTML, CSS and Javascript/Typescript" This should be added within HTML  <script> tag. <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular.min.js"></script> Angular Js mainly used to make a single page, data-driven application. As well as we can add additional content brought into the web page without the need to refresh. Before going to AngularJS, We should know the     HTML     CSS     JavaScript     Json (optional)  Benefits of using angular Js     Gives our applications a clean structure     Includes a lot of re-usable code     Makes our applications more testable      Using Angular makes your life easier!   Let's Start learning with ...