Search This Blog

Friday, November 6, 2015

What is AngularJS?


AngularJS is quickly and efficient to work for developers.
-Extends Hyper text markup Language
-Dynamic webapps
-Its runs single page application like (If you search records in same page)
-Databinding within the pages
- Easy to learn and implementation our Application

We need to know

HTML
Javscript
CSS


Basic in AngularJS
  • Directives, 
  • Expressions,
  • Filters,
  • Modules, 
  • Controllers 
Majorly Used:
  1. Events, 
  2. DOM, 
  3. Forms,
  4.  Input, 
  5. Validation

Difference between Jquery and Angular js ?

jQuery:

  • jQuery is Library
  • JQuery sometimes is a very slow to manipulate the DOM
  • Also an slow way to manipulate the DOM, affecting in this way the user experience.
  • the jqlite and pure javascript to manipulate the DOM and follow the best practices to create  directives.
  • jQuery is a JavaScript library that handles ways to manipulate your HTML. 
  • It ensures that your code will be compatible as this library is maintained by a huge group of experts.
  • JQuery is definitely something that front-end developers should know well before even touching Angular, 
  •  jQuery is less prone to that.
  •  I do MVC and jQuery is a part of the view, but the Model and Controller are made in server-side technologies

Angular JS

  • AngularJS is a FRAMEWORK 
  • to create a complex web app for which you need a massive amount of Javascript and keep it organized, flexible and manageable? Use AngularJS. In fact, AngularJS has jQuery built-in (jqLite).
  • Angular is an JavaScript structural framework that has a lot of the effects similar to jquery, but is a more designed to create one-page web applications. 
  • It is also open source and compatible. Angular often plays along with other technologies for quick efficient development or larger web applications.
  • Angular will often seem like an extremely opinionated and hard to grasp beast. Angular is a framework, and like with every framework out there, you need to understand the language(s) it employs. I say learn to walk before you run, and don't become a snob who wants to do everything in Angular just because it sounds cool. 
  • Angular is going through pretty significant changes and its versions tend to break things.
  • AngularJS would be an overkill to make another MVC over the View layer whereas the Controller and Model are server-side
  • Mobile apps and MVC but have no server-side technologies behind, so the MVC structure implemented in AngularJS.

how to selected dropdown value in angularjs

HTML:

<div ng-app>
    <h2>TAsk Details</h2>
    <div ng-controller="TodoCtrl">
        <select ng-model="ddlRooms" ng-options="r.id as r.Name for r in Rooms">
        </select>
        {{$scope.test}}
    </div>
</div>
Angular

function TodoCtrl($scope) {
    $scope.Rooms = [{ Name: 'Toddler', id: 1 },{ Name: 'other', id: 2 }];
    $scope.options = [{ Name: 'other', id: 2 }];
    $scope.ddlRooms = $scope.options[0];

    $scope.test = 'bla';
}

No comments:

Post a Comment