Over a million developers have joined DZone.

Basics of AngularJs – Part 2

·

I have explained introduction of AngularJS in my previous article and now we will discuss the basic concept of AngularJS and why we need to use AngularJS and its features.

Introduction to AngularJS

Basics of AngularJS

You can also read this article to my blog here

What is AngularJS?

AngularJS is a javascript framework for created to build a structured and dynamic web application.

Why AngularJS?

  • It is a lightweight platform and open source
  • We can use many ways to structure a web application at client side
  • Added attaching directives, custom tags, attributes, expressions, templates within HTML
  • It can support to test driven development (TDD)
  • It can support to MVC and MVVM design pattern
  • We can easily do maintainability and extensibility
  • We can easily code reuse in application
  • We can develop for Single Page Application

Features of AngularJS

  • Data Binding: Two-Way Data Binding
  • Directives
  • MVC design pattern
  • Dependency Injection
  • Testing
  • Routing
  • Templates
  • Models
  • Controllers
  • Validation
  • Filters

 DataBinding

Data binding is automatic updating the changes of data between the model and view. When the model changes, the view reflect the changes and vice versa.

Image title


Directive

Directive can be used in element name, attributes, class names as well as comments.

Name:  <input id="Text1" type="text" ng-model="name"/> 


MVC

Model: 

It is contains a business logic with an application functionality and notify view changes.

View: 

It is render the model data and send user request to controller.

Controller: 

It is contains an application behaviour and maps user action to model, select view for response.

Image title

DependencyInjection

Dependency Injection (DI) is a software design pattern that deals with how components get hold of their dependencies.

Filters

We can use filter format data for display to the user.

{{expression | filter_name}}
{{expression | filter1 | filter2 | ...}}

Conclusion

This article helps you to understand the basics of AngularJS and its features.



Thank you for reading my articles. Please kindly share your valuable comments and suggestion with me.

Topics:
angularjs ,asp.net ,c#

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}