input license here

What is Angular? What you need to know about this popular JS framework






If you are interested in software development, you may have heard of Angular. This is one of the frameworks JavaScript the most popular that developers use to build dynamic websites. In this article, you will learn the concept of what AngularJS is, when was Angular first built and its advantages.


What is AngularJS?


What is Angular?


So what is Angular? It is an open source, technical framework used to build single-page web applications. Programmers also use it to create dynamic menus for web pages HTML.


This framework is the brainchild of engineers Google, Misko Hevery and Adam Abrons. Google officially released its first version, AngularJS, in 2012 and has maintained it ever since.


Before the release of AngularJS, there were other ways to create dynamic pages. However, they are not as convenient as this framework.


AngularJS uses architecture Model-View-Controller (MVC), used in web application development.


This type of architecture includes:



  • Model – data structures that manage information and receive input from the controller

  • View – representation of information

  • Controller – respond to input and interact with the model


In AngularJS, the model is the framework, the view is HTML, and the control is JavaScript.


Simply put:



  • AngularJS constraint JavaScript and HTML

  • JavaScript receive user input and send it to AngularJS

  • AngularJS uses input to Revision HTML


As for binding JavaScript and HTML frameworks, the code between them is synchronized. This mechanism makes the work of web developers easier as it reduces the amount of code that needs to be written.


Advantages of AngularJS


AngularJS is popular among web developers for a few reasons:



  • Two-way data binding – Since the architecture of AngularJS binds JavaScript and HTML, the code for both is synchronized. Thus, the framework saves a lot of time for developers.

  • Directive The framework extends the functionality of HTML files with directives. To enable directives, the developer prefixes ng- into HTML attributes. You can see the list of directives here. Here is an example of using directives:
    <!DOCTYPE html>
    <html>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
    <body>

    <div ng-app="" ng-init="age="20"">

    <p>Input your age:</p>
    <p>Age: <input type="text" ng-model="age"></p>
    <p>You wrote: {{ age }}</p>

    </div>

    </body>
    </html>

    <!DOCTYPE html>
    <html>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
    <body>

    <div ng-app="" ng-init="age="20"">

    <p>Input your age:</p>
    <p>Age: <input type="text" ng-model="age"></p>
    <p>You wrote: {{ age }}</p>

    </div>

    </body>
    </html>


  • Code structure – AngularJS provides you with templates; allows you to create applications with concise code. Not only does it save time, but it also makes it easier for you to modify or repair your applications.

  • Experiment The framework supports unit and integration testing.

  • Bright future – The future of Angular is bright because of its functionality and popularity. The user base will continue to grow and a wealth of in-depth material will be continuously updated.

  • Compatible with mobile and desktop devices – AngularJS can run on most web browsers. Not only on desktop, but also mobile devices.


Before learning AngularJS


You need to remember that AngularJS is a JavaScript framework. Therefore, you need to understand the basics of this programming language before learning AngularJS.


The same applies to related programming languages ​​such as HTML, CSS and AJAX.


Knowing the basics of JavaScript before learning AngularJS will allow you to:



  • Follow the rapid evolution of Angular

  • Know when to use a framework

  • Become a flexible and creative developer


Conclude


AngularJS is a JavaScript framework that Developers used to create single-page web applications. Due to the use of architecture Model-View-Controller, you don't have to manually write the same code for your HTML and JavaScript files.


In addition, the framework provides several benefits:






  • Compatible with mobile phones and desktops


You already know what Angular is right? But if you have questions about Angular, or want to discuss this framework, leave a comment below!





Author






Hai G. is an expert in managing and operating website services. He has many years of experience in VPS, Hosting, technical SEO, CMS. Especially love WordPress and have been using it for over 5 years now. His hobbies are reading, blogging, traveling and mentoring young people to start a business.





Related Posts
Diệp Quân
Nguyen Manh Cuong is the author and founder of the vmwareplayerfree blog. With over 14 years of experience in Online Marketing, he now runs a number of successful websites, and occasionally shares his experience & knowledge on this blog.
SHARE

Related Posts

Subscribe to get free updates

Post a Comment

Sticky