AngularJS Tutorials- Basics of AngularJS

AngularJS TUTORIALS- BASIC OF AngularJS

AngularJS TUTORIALS- BASIC OF AngularJSWhat is AngularJS:

AngularJS was originally developed in 2009 by Miško Hevery. AngularJS is an open-source front-end web application framework which is based on JavaScript. Angular js initial release on October 20, 2010, developed by Google.  It can be added to an HTML page with a <script> tag. Angular js is written in javascript. Basically, AngularJS is a structural framework for dynamic web apps.

AngularJS website: https://angularjs.org

AngularJS is distributed as a JavaScript file, and can be added to a web page with a script tag:

AngularJS directives allow the developer to specify custom and reusable HTML-like elements and attributes that define data bindings and the behavior of components.

Angular has the following key features which make it one of the powerful frameworks:

  1. MVC
  2. Data Model Binding
  3. Writing less code
  4. Unit Testing ready

What You Should Already Know:

  • JavaScript functions, events, and error handling
  • Basic knowledge of HTML, CSS
  • The Document Object Model (DOM) knowledge
  • Basic Model-View-Controller (MVC) knowledge

Angular js example:

The above example is plain HTML code with a couple of AngularJS directives (attributes) such as ng-app, ng-model, and ng-bind. You can try it in your code editor.

Advantages of AngularJS:

  • Supported by Google
  • Supports separation of concerns by using MVC design pattern
  • Easy to extend and customize
  • Supports Single Page Application.
  • Built-in attributes (directives) makes HTML dynamic
  • REST-friendly
  • No need to learn another scripting language. It’s just pure JavaScript and HTML
  • Easy to Unit test

The following table lists all the important concepts in AngularJS:

Concept Description
Template HTML with additional markup
Directives Extends the HTML with custom attributes and elements
Model The data shown to the user in the view and with which the user interacts
Scope A context where the model is stored so that controllers, directives and expressions can access it
Expressions Executes JavaScript code inside brackets {{ }}.
Compiler Parses the template and instantiates directives and expressions
Filter Formats the value of an expression for display to the user
View what the user sees (the DOM)
Data Binding Sync data between the model and the view
Controller Maintains the application data and business logic
Module a container for different parts of an app including controllers, services, filters, directives which configure the Injector
Service Reusable business logic, independent of views
Dependency Injection Creates and wires objects and functions
Injector Dependency injection container

Working with:

AngularJS works perfectly with NodeJS and MongoDB in my opinion. You can also use PHP, Ruby on Rails, Python: Flask and Django too.

I love coding in AngularJS and you will love this too, just give it some time.

Now you have the basic idea about AngularJS.

1 reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.