Skip to main content

Posts

Showing posts with the label AngularJs

AngularJs notes

 Two Requirements Add <script> tag pointing to angular.js Add an ng-app attribute in your HTML ng-app is an angular directive the ng is short for Angular <div ng-app> this is an example </div> To simple check that is angular js running or not, simple use {{ 4 * 4 }} in a plain html  <div ng-app> this is an example {{ 4 * 4 }} </div> siddhu

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 😨. We thought we missed out somethin

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, we can use the directive ng-init . The

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 deep examples, you can download the latest version in https://angularjs.org/